Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Windows XP 控制台命令詳解:輔助操作與特殊功能篇(上)

編輯:XP 系統基礎知識

Windows XP/2000 的「復原主控台」提供一組強大的命令列工具,可在系統無法正常啟動時進行診斷、修復與救援。本文整理常用命令語法、參數與實務範例,包含 cls、disable、enable、exit、help、listsvc、logon、net use、set、systemroot 等,是系統管理員與進階使用者的必備參考。

命令速查表

cls — 清除螢幕

僅顯示命令提示字元與游標。

disable — 停用服務或驅動程式

disable {service_name | device_driver_name}
  • 將指定服務/驅動程式啟動類型設為 SERVICE_DISABLED。
  • 執行時會顯示原啟動類型,請記下以便日後用 enable 還原。
  • 五種啟動類型:SERVICE_AUTO_START(自動)、SERVICE_DISABLED(停用)、SERVICE_DEMAND_START(手動)、SERVICE_BOOT_START(開機載入)、SERVICE_SYSTEM_START(系統載入)。

範例: disable eventlog 停用事件記錄服務。

enable — 啟用服務或驅動程式

enable {service_name | device_driver_name} [startup_type]
  • startup_type 可為上述五種類型之一;省略時僅顯示目前類型。
  • 執行時會顯示原啟動類型,方便復原。

範例: enable eventlog service_auto_start 將事件記錄服務設為自動啟動。

exit — 離開復原主控台並重開機

無參數,直接輸入 exit 即可。

help — 線上說明

help [commandname]
  • 無參數時列出所有可用命令。
  • 亦可輸入 命令名 /? 取得說明(如 help extract 或 extract /?)。

listsvc — 列出所有服務與驅動程式

無參數,僅於復原主控台可用。

logon — 登入 Windows 安裝

列出偵測到的 Windows 安裝,需輸入本機管理員密碼。連續 3 次失敗將退出並重開機。

net use — 掛載網路共享到磁碟機代號

net use [\\ComputerName\ShareName [/user:[DomainName\]UserName] [password]] | [drive_letter:] [/d]
  • 僅限復原主控台使用此語法;一般命令提示字元另有一組參數。
  • /d 為中斷連線。

set — 顯示/設定復原主控台環境變數

set [variable=[string]]

支援變數:

  • AllowWildCards:允許 del 等命令使用萬用字元。
  • AllowAllPaths:允許存取所有檔案與目錄。
  • AllowRemovableMedia:允許複製檔案至可移動媒體。
  • NoCopyPrompt:覆寫檔案時不提示。

範例: set allowwildcards=true

systemroot — 切換至目前登入安裝的 %SystemRoot%

無參數,僅於復原主控台可用。


善用這些命令,能在系統嚴重受損、無法進入圖形介面時,仍具備修復登錄、停用故障驅動、複製備份檔案、掛載網路資源等關鍵救援能力。建議列印備份或儲存至隨身碟,關鍵時刻派上用場。

Copyright © Windows教程網 All Rights Reserved