2007年9月5日 星期三

Windows 開啟系統碟異常

近日發現,當windows xp sp2版本開啟系統碟(ex: C,D...)會出現選取程式開啟的異常狀況。
上網找了一下相關的資料,並且修改了一下內容,將其描述於下,供大家參考。
首先將下面的程式碼


reg.exe add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDriveAutoRun /t REG_BINARY /d ffffff03 /f
reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer" /v NoDriveTypeAutoRun /t REG_DWORD /d 0x000000df /f

reg.exe add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDriveTypeAutoRun /t REG_DWORD /d 0x000000df /f
reg.exe add "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDriveTypeAutoRun /t REG_DWORD /d 0x000000df /f

reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2" /f

cd
C:
md autodir
attrib -a -s -h -r autorun.inf /q
ren autorun.inf cauto.txt
move cauto.txt autodir

D:
attrib -a -s -h -r autorun.inf
ren autorun.inf dauto.txt
move dauto.txt C:autodir

E:
attrib -a -s -h -r autorun.inf
ren autorun.inf eauto.txt
move eauto.txt C:autodir

F:
attrib -a -s -h -r autorun.inf
ren autorun.inf fauto.txt
move fauto.txt C:autodir

G:
attrib -a -s -h -r autorun.inf
ren autorun.inf gauto.txt
move gauto.txt C:autodir



將以上的文字一字不漏將其存檔成fix.bat(檔名可自訂),點兩下執行,接著重新啟動電腦即可!

以上若個人的磁碟有超過G以下,則增加類似下段內容即可!
紅色自體為需要修改的部份(EX:磁碟槽H則需改為h)


H:
attrib -a -s -h -r autorun.inf
ren autorun.inf hauto.txt
move hauto.txt C:autodir


以上若有任何疑問歡迎提出指教!^^