Boot time interface commands
Last updated on
The boot time interface of UltraDefrag supports a wide set of commands.
Commands displaying long lists (
type) do split their output into multiple pages with the prompt to hit any key to continue between them in the interactive mode.
This command enables the boot time defragmentation for subsequent system reboots.
This command disables the boot time defragmentation for subsequent system reboots. It is a good idea to put this command to the beginning of the boot time script to make sure Windows will remain bootable even if something will go wrong during defragmentation.
This command is similar to the equivalent Windows command. It executes a batch script. If none is specified the command executes the main boot time script (%SystemRoot%\system32\ud-boot-time.cmd):
:: execute the C:\WINDOWS\system32\my-boot-time-script.cmd script
This command is similar to the equivalent Windows command. It displays a message or an empty line, sets whether the commands will be shown on the screen or not, or displays the current setting:
:: do not display commands on the screen
:: show the current status of echo
:: display a couple of messages with an empty line in between
echo Greetings from Georgia!
This command is similar to the equivalent Windows command. It terminates the script execution and passes control back to the Windows boot process. It is a good idea to put this command to the end of the boot time script unless you want to use the interactive boot time console.
This command displays the list of all the available commands.
This command displays a file in a hexviewer layout:
0000000000000000: ff fe 40 00 65 00 63 00 | ӱϸ@ e c
0000000000000008: 68 00 6f 00 20 00 6f 00 | h o o
0000000000000010: 66 00 66 00 0d 00 0a 00 | f f
0000000000000018: 62 00 6f 00 6f 00 74 00 | b o o t
0000000000000020: 2d 00 6f 00 66 00 66 00 | - o f f
0000000000000028: 0d 00 0a 00 0d 00 0a 00 |
hexview command is useful for troubleshooting. For instance, if you will save a boot time script in an encoding other than UTF-16, UltraDefrag will not be able to execute it. To check whether the script encoding is correct or not, you can use the
hexview command to check the first 2 bytes of the script. If the script encoding is correct, you will see ff fe in the beginning of the script, as in the example above.
This command displays the list of all the manually entered commands. To cycle through them use the up/down arrow/cursor keys on the keyboard.
This command displays a manual page or the list of all the available manual pages if called without an argument:
:: list all the available manual pages
:: display the udefrag command manual
This command pauses the script execution for the specified number of milliseconds or displays a message Hit any key to continue… and waits till a key is pressed if no duration is specified:
:: pause the script execution for one second
:: pause the script execution till a key is pressed
This command reboots the computer.
This command is similar to the equivalent Windows command. It sets, clears and lists environment variables:
:: show all the environment variables
:: show all UltraDefrag specific environment variables
:: set the UD_IN_FILTER environment variable
:: clear the UD_IN_FILTER environment variable
This command shuts the computer down. It is especially useful when you perform an operation which takes a lot of time, for instance, the disk optimization:
:: optimize the system disk
udefrag -o %SystemDrive%
:: shut the computer down when
:: the disk optimization finishes
This command is similar to the equivalent Windows command. It displays a file on the screen. If no file is specified the command displays the main boot time script:
:: display the custom boot time script
The main purpose of the
type command is troubleshooting. For instance, you can easily display your boot time scripts using it in the interactive console to check them for syntax errors. Also you can use the
type command to display long pieces of text and even to read books at boot time 🙂
Arthur Conan Doyle
The Sign of the Four
In Quest of a Solution
It was half-past five before Holmes returned. He was bright, eager,
and in excellent spirits, a mood which in his case alternated with
fits of the blackest depression.
"There is no great mystery in this matter," he said, taking the cup
of tea which I had poured out for him. "The facts appear to admit of
only one explanation."
"What! You have solved it already?"
"Well, that would be too much to say. I have discovered a suggestive
fact, that is all. It is, however, very suggestive. The details are
Hit any key to display the next page, Esc or Break to abort...
This command is a boot time equivalent of the udefrag command from UltraDefrag CLI. It supports the following command line switches:
To process individual files and directories specify their full paths and enclose them by double quotes if the paths contain spaces:
udefrag "C:\Documents and Settings\*" C:\WINDOWS\WindowsUpdate.log