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

Win7 Ping 指令提示「不是內部或外部命令」?環境變數 Path 遺失 System32 路徑修復

編輯:Win7 系統應用技巧

CMD 執行 ping 提示「'ping' 不是內部或外部命令、可執行的程式或批次檔」,是因為系統環境變數 Path 遺失 C:\Windows\System32 路徑。修復方法:

修復步驟

  1. 滑鼠右鍵「電腦」→「內容」→「進階系統設定」→「進階」索引標籤 → 「環境變數」。
  2. 在「系統變數」區塊找到 Path,雙擊編輯。
  3. 在「變數值」最前端或末端加入 ;C:\Windows\System32\(注意前面必須有英文分號 ; 分隔)。
  4. 按「確定」關閉所有視窗,重新開啟 CMD 測試 ping www.google.com 應正常回應。

進階系統設定開啟環境變數

環境變數視窗編輯 Path

Path 變數值加入 C:\Windows\System32

Ping 指令恢復正常

補充: 若 Path 變數值過長導致截斷,建議清理無效路徑或使用 setx 指令分段設定。修改環境變數後需重新開啟 CMD 才生效。

Copyright © Windows教程網 All Rights Reserved