winnt32 /cmdcons → 開機選單出現「Microsoft Windows Recovery Console」| 指令 | 參數/範例 | 用途 |
|---|---|---|
attrib | attrib -h -r -s C:\boot.ini | 修改檔案屬性 (隱唯系統) |
batch | batch C:\commands.txt | 批次執行指令檔 |
bootcfg | /list /scan /rebuild /default /id | Boot.ini 管理 |
chkdsk | /p /r | 磁碟檢查修復 |
copy | copy D:\i386\ntldr C:\ | 複製檔案 (支援壓縮檔自動展開) |
delete/del | del C:\pagefile.sys | 刪除檔案 |
dir | dir C:\ /a | 列出檔案 (含隱藏/系統) |
disable | disable sptd | 停用服務/驅動 (回傳原啟動類型) |
diskpart | /add /delete device partition size | 分區管理 |
enable | enable sshd SERVICE_AUTO_START | 啟用服務/驅動 |
expand | expand D:\i386\hal.dl_ C:\windows\system32\hal.dll | 解壓縮 _ 結尾檔案 |
fixboot | fixboot C: | 寫入啟動扇區 |
fixmbr | fixmbr \Device\HardDisk0 | 修復 MBR |
format | format D: /FS:NTFS /Q | 格式化 |
help | help 指令名 | 說明 |
listsvc | listsvc | 列出服務狀態 |
logon | logon | 切換 Windows 安裝 |
map | map | 顯示裝置對應 |
mkdir/md | md C:\temp | 建立目錄 |
more/type | type C:\boot.ini | 顯示檔案內容 |
ren/rename | ren ntfs.sys ntfs.old | 重命名 |
rmdir/rd | rd /s C:\temp | 刪除目錄 |
set | set allowallpaths=true | 設定環境選項 (解除路徑限制等) |
systemroot | systemroot | 切換到 %SystemRoot% |
exit | exit | 退出重啟 |
cd \windows\system32\drivers
ren ntfs.sys ntfs.old
copy D:\i386\ntfs.sys .
exit
copy D:\i386\ntldr C:\
copy D:\i386\ntdetect.com C:\
# 檢查 Boot.ini
type C:\boot.ini
# 若遺失/錯誤
bootcfg /rebuild
fixboot C:
copy D:\windows\repair\sam C:\windows\system32\config\sam
# 注意:repair 版為安裝初始狀態,會丟失後建用戶
# 進入系統後立即執行「系統還原」回最新還原點
bootcfg /add
# 掃描發現安裝 → 選擇編號 → 輸入載入識別符 "Windows XP" → OS載入選項 "/fastdetect"
exit
# 若仍有其他系統,重複執行 /add
# 1. 掃描尋找安裝
bootcfg /scan
# 2. 重建 Boot.ini 指向 D:\WINDOWS
bootcfg /rebuild
# 3. 複製啟動檔到作用中分區 (通常 C:)
copy D:\i386\ntldr C:\
copy D:\i386\ntdetect.com C:\
# 4. 寫入啟動扇區
fixboot C:
set allowallpaths=true、set allowwildcards=true、set allowremovablemedia=true、set nocopyprompt=true (需本機安全性原則啟用)regedit → 檔案 → 載入機構 → C:\Windows\System32\config\SYSTEM / SOFTWARE / SAM / SECURITY / DEFAULTrepair\sam 或用 chntpw (Linux PE)XP 修復主控台功能有限、無圖形介面、不支援現代硬體 (NVMe、UEFI、USB3)。**現代維護請使用:**
bcdboot、bootrec /fixmbr /fixboot /scanos /rebuildbcd、diskpart、dism、sfc /offbootdir /offwindir、PowerShell 完整腳本