啟動時介面概述
最後更新日期:
UltraDefrag 包含一個特殊的啟動時接口,其目的是在系統重新啟動期間,在 Windows 和應用程式完全載入並鎖定檔案之前,對鎖定的檔案執行碎片整理和最佳化。.
筆記
請查看以下文章,了解如何使用 UltraDefrag 的啟動時介面執行典型的磁碟片段整理任務:
UltraDefrag 啟動時介面的另一個有趣功能是,您可以為其編寫自訂腳本,甚至可以互動式地使用它。請依照以下步驟指南操作:
-
啟動 UltraDefrag 並點擊 啟動時處理 > 編輯自訂腳本.

或者,您也可以在您喜歡的文字編輯器中手動開啟以下文件:
%SystemRoot%\system32\ud-boot-time-custom.cmd。 -
將以下內容貼到腳本中,然後儲存:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19@echo off
::
:: A custom boot time script example.
::
:: This script optimizes the master
:: file table (MFT) on the system disk.
::
:: Please note, you have to save this script
:: in Unicode (UTF-16 / UCS-2 LE BOM) encoding.
::
:: turn the boot time defragmentation off for subsequent boots
boot-off
:: optimize the master file table on the system disk
udefrag --optimize-mft %SystemDrive%
:: pass control back to the Windows boot process
exit -
點選 啟動時處理 > 執行自訂腳本.

-
點選 是的 立即執行啟動時腳本或 稍後重啟 下次系統重新啟動時執行。.

-
系統重新啟動期間, UltraDefrag 將啟動其啟動時介面並執行自訂腳本。.
UltraDefrag 15.0.0 boot time interface.
Copyright (c) 2018-2026 Green Gate Systems, LLC.
UltraDefrag comes with ABSOLUTELY NO WARRANTY.
If something is wrong, hit F8 on startup
and select 'Last Known Good Configuration'
or execute 'CHKDSK {Drive:} /R /F'.
Keyboard device found: \Device\KeyboardClass0.
Press any key to exit .....
Preparing to optimize MFT on disk C: ...
Use Pause/Break key to abort the process early.
Optimization: 100.00%, fragmented/total=0/1009398
Drive information:
Total space = 118.12 GB
Free space = 15.77 GB
Total number of files = 1009398
Number of fragmented files = 0
Fragments per file = 1.00
Fragmentation = 0.00%
Good bye...
互動式控制台
如果省略 exit 腳本中的命令, UltraDefrag 將在腳本執行後顯示一個互動式啟動控制台:
Interactive mode:
Type 'help' to list available commands.
#
Type 'help' to list available commands.
#
互動式控制台對於學習腳本語法和命令非常有用,因為您可以逐個輸入命令,並在編寫自己的自訂啟動腳本之前檢查它們的工作原理。.
此外,您也可以在腳本執行期間隨時按下鍵盤上的Esc鍵進入控制台。
腳本語法
UltraDefrag 使用類似批次的語法來編寫自訂啟動腳本。以 `\ :: ` 或 ; `\` # 是註解。所有其他行都以命令名稱開頭,後面跟著可選參數。如果命令 @ 名稱前有 `\` 符號,命令列解釋器在執行命令前不會顯示該命令。