To defragment files locked most of the time UltraDefrag can be launched inside of the Windows boot process. Being executed there UltraDefrag can defragment almost everything including paging and hibernation files.
To process selected disks at Windows boot click Action > Boot time defragmentation and select the action you would like to perform. The program will show a reboot confirmation dialog then. Click Reboot now to reboot the computer and perform the selected action at Windows boot immediately or click Reboot later to perform the action at the next system reboot.
Also it is possible to execute a custom script at Windows boot. Just click Action > Boot time defragmentation > Execute custom script. To adjust the script click Action > Boot time defragmentation > Edit custom script or open the following file manually in a text editor: %SystemRoot%\system32\ud-boot-time.cmd.
The following command line tools can also be used to control the boot time defragmentation: boot-on, boot-off and boot-config. The first one enables the boot time defragmentation, the second one disables it and the last one opens the custom script in Notepad.
The boot time interface is pretty straightforward. First of all it shows a prompt to hit any key to exit and then performs the selected action. The process can be easily aborted at any time using the Pause/Break key. Also it is possible to use the boot time interface interactively. Just hit the Escape key at any time and the program will show you the following prompt and wait for your input:
Interactive mode: Type 'help' to list available commands. #
The same interactive console will be shown on the screen after the custom script execution if the script does not include the exit command.
000000C0: 0a 00 3b 00 20 00 46 00 | ; F 000000C8: 72 00 61 00 67 00 6d 00 | r a g m 000000D0: 65 00 6e 00 74 00 65 00 | e n t e
All commands displaying long lists (help, hexview, history, man, set, type) are splitting them into pages in the interactive mode.
Environment variables can be used the same way as in Windows batch files.
Two special variables are supported: DATE for the current date in the format YYYY-MM-DD and TIME for the current time in the format HH-MM:
2012-02-14 12-48
Encrypted disks cannot be defragmented at boot time because the local security service is inactive on early stages of Windows boot.
UltraDefrag terminates immediately in Windows safe mode because it cannot display text on the screen there.
By default the program uses the following custom script:
◄ Console Interface | Automatic Defragmentation ▶ |