萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 作業系統 >  >> Windows XP 教學

WinXP 工作列顯示重複標籤?VBScript 一鍵修復註冊表損毀

開啟多個程式時,工作列應顯示各自按鈕,若全部變成相同標籤且重複兩列,通常是 StuckRects2、Streams 等 Explorer 相關登錄鍵值損毀。提供一支 VBScript 自動清理並重啟 Explorer,四步驟即可修復。

工作列重複標籤故障

修復腳本內容(複製存為 FixTaskbar.vbs)

Set WSHShell = WScript.CreateObject("WScript.Shell")
Message = "本腳本修復 XP 工作列最小化不顯示/重複標籤問題。" & vbCr & vbCr
Message = Message & "將關閉並重啟 Windows Explorer,不損害系統。" & vbCr & vbCr
Message = Message & "請關閉防毒軟體即時掃描並儲存開啟檔案。" & vbCr & vbCr
Message = Message & "是否繼續?"
X = MsgBox(Message, vbYesNo+vbExclamation, "注意")
If X = 6 Then
  On Error Resume Next
  WshShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2"
  WshShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\MRU"
  WshShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop"
  WshShell.RegDelete "HKCU\Software\Microsoft\Internet Explorer\Explorer Bars\{32683183-48a0-441b-a342-7c2a440a9478}\BarSize"
  P1 = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"
  WshShell.RegWrite P1 & "\NoBandCustomize", 0, "REG_DWORD"
  WshShell.RegWrite P1 & "\NoMovingBands", 0, "REG_DWORD"
  WshShell.RegWrite P1 & "\NoCloseDragDropBands", 0, "REG_DWORD"
  WshShell.RegWrite P1 & "\NoSetTaskbar", 0, "REG_DWORD"
  WshShell.RegWrite P1 & "\NoToolbarsOnTaskbar", 0, "REG_DWORD"
  WshShell.RegWrite P1 & "\NoSaveSettings", 0, "REG_DWORD"
  WshShell.RegWrite P1 & "\NoActiveDesktop", 0, "REG_DWORD"
  WshShell.RegWrite P1 & "\ClassicShell", 0, "REG_DWORD"
  P1 = "HKCU\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\LocalUser\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"
  WshShell.RegWrite P1 & "\NoCloseDragDropBands", 0, "REG_DWORD"
  WshShell.RegDelete P1 & "\NoMovingBands"
  P1 = "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell"
  WshShell.RegWrite P1, "explorer.exe", "REG_SZ"
  P1 = "HKCU\Software\Microsoft\Internet Explorer\Explorer Bars\{32683183-48a0-441b-a342-7c2a440a9478}"
  WshShell.RegDelete P1 & "\BarSize"
  WshShell.RegWrite P1, "媒體區", "REG_SZ"
  On Error Goto 0
  For Each Process In GetObject("winmgmts:").ExecQuery("select * from Win32_Process where name='explorer.exe'")
    Process.Terminate(0)
  Next
  MsgBox "完成!" & vbCr & vbCr & "© Kelly Theriot and Doug Knox", 4096, "完成"
Else
  MsgBox "未對系統進行任何變更。" & vbCr & vbCr & "© Kelly Theriot and Doug Knox", 4096, "使用者取消"
End If

記事本編輯 VBS 腳本

使用方法

  1. 開啟記事本,貼上上述完整代碼。
  2. 另存為 FixTaskbar.vbs(編碼選 ANSI/UTF-8 均可)。
  3. 關閉所有重要程式、暫停防毒軟體即時掃描。
  4. 雙擊執行腳本,點選「是」確認,等待彈出「完成」訊息。

原理與備註

  • 腳本刪除損毀的 Explorer 工作列佈局鍵值(StuckRects2、Streams),重設工具列原則,最後終止 explorer.exe 讓系統自動重啟並重建乾淨佈局。
  • 來源為 Kelly Theriot 與 Doug Knox 經典修復腳本,廣泛用於 XP/2003。
  • 若執行後問題未解,嘗試刪除 HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarSizeMove 或重建使用者設定檔。
copyright © 萬盛學電腦網 all rights reserved