HKEY_CURRENT_USER
└ Software
└ Microsoft
└ Windows
└ CurrentVersion
└ Run
HKEY_LOCAL_MACHINE
└ Software
└ Microsoft
└ Windows
└ CurrentVersion
└ Run
└ OptionalComponents
├ IMAIL
├ MAPI
└ MSFS
-------------------------------------------------------------
有兩個,HKCU 與 HKLM
且 HKLM 的 Run 底下還有 2 層!
-------------------------------------------------------------
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"ctfmon.exe"="C:\\WINDOWS\\system32\\ctfmon.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OptionalComponents]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OptionalComponents\IMAIL]
"Installed"="1"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OptionalComponents\MAPI]
"Installed"="1"
"NoChange"="1"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OptionalComponents\MSFS]
"Installed"="1"
-------------------------------------------------------------
這兩區有時會鎖住,有時可以修改有時不行 XD
確切的原因小弟也不知...
幸好,在 RunOnceEx 最後導入的 .cmd 中能正常運作 @@"
-------------------------------------------------------------
以下為清空這兩區並依照防毒加入 (CMD)
set KEY=Software\Microsoft\Windows\CurrentVersion\Run
reg delete HKCU\%KEY% /va /f > nul
reg delete HKLM\%KEY% /va /f > nul
reg add HKCU\%KEY% /v "ctfmon.exe" /d "C:\WINDOWS\system32\ctfmon.exe" /f > nul
if exist "%programfiles%\Kaspersky Lab\Kaspersky Internet Security 2010\avp.exe" reg add HKLM\%KEY% /v "AVP2" /d "\"C:\Program Files\Kaspersky Lab\Kaspersky Internet Security 2010\avp.exe\"" /f > nul
if exist "%programfiles%\Alwil Software\Avast4\ashDisp.exe" reg add HKLM\%KEY% /v "avast!" /d "C:\\PROGRA~1\\ALWILS~1\\Avast4\\ashDisp.exe" /f > nul
if exist "%programfiles%\ESET\ESET Smart Security\egui.exe" reg add HKLM\%KEY% /v "egui" /d "\"C:\Program Files\ESET\ESET Smart Security\egui.exe\" /hide /waitservice" /f > nul
reg add HKLM\%KEY%\OptionalComponents\IMAIL /v "Installed" /d "1" /f > nul
reg add HKLM\%KEY%\OptionalComponents\MAPI /v "Installed" /d "1" /f > nul
reg add HKLM\%KEY%\OptionalComponents\MAPI /v "NoChange" /d "1" /f > nul
reg add HKLM\%KEY%\OptionalComponents\MSFS /v "Installed" /d "1" /f > nul
沒有留言:
張貼留言