|
unsysceo.cmd
REM 參考資料來源https://github.com/chemicalfiber/Anti-DrvCeo/blob/main/unNew.bat修改
REM 取得管理員權限
setlocal EnableDelayedExpansion
title 驅動總裁清理程序
PUSHD %~DP0 & cd /d "%~dp0"
%1 %2
mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :runas","","runas",1)(window.close)&goto :eof
:runas
REM 關掉驅動總裁處理程序
TASKKILL /IM DrvCeo.exe /f /t
REM 查詢"桌面"和"開始選單"的位置
for /f "tokens=3,*" %%i in ('REG QUERY "HKLM\SOFTWARE\Microsoft\windows\currentVersion\Explorer\shell folders" /v "common desktop"') do (set desk=%%j)
for /f "tokens=3,*" %%i in ('REG QUERY "HKLM\SOFTWARE\Microsoft\windows\currentVersion\Explorer\shell folders" /v "common programs"') do (set cmp=%%j)
REM 刪除捷徑方式
del /s /q /f "%desk%\*裁.lnk";"%desk%\DrvCeo.lnk";"%desk%\驅動總裁.lnk"
rd /s /q "%cmp%\*裁2.0";"%cmp%\DrvCeo2.0";"%cmp%\驅動總裁2.0"
del /s /q /f "%cmp%\..\驅動下載.lnk";"%cmp%\..\*下*.lnk"
REM 刪除註冊表項目
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\DrvCeo2.0" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DrvCeo" /f
REG DELETE "HKLM\SOFTWARE\Microsoft\windows\currentVersion\Uninstall\DrvCeo2.0" /f
REG DELETE "HKLM\SOFTWARE\Wow6432Node\Microsoft\windows\currentVersion\Uninstall\DrvCeo2.0" /f
REG DELETE "HKLM\SOFTWARE\Wow6432Node\Microsoft\windows\currentVersion\Run" /f
REG DELETE "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\UFH\SHC" /f
REG DELETE "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache" /f
C:\Windows\System32\attrib "%systemroot%%\temp\sysceo" -s -r -h /s /d
C:\Windows\System32\attrib "C:\Windows\Temp\~DrvCeoLog" -s -r -h /s /d
C:\Windows\System32\attrib "C:\Windows\Temp\~ScLog" -s -r -h /s /d
C:\Windows\System32\attrib "C:\Windows\Temp\*.* -s -r -h /s /d
REM 刪除程序主文件
rd /s /q "%programfiles%\SysCeo";"%programfiles(x86)%\SysCeo"
REM 刪除在在線版安裝包
del /s /q /f "%systemroot%%\Help\dcold.exe"
del /s /q /f "%systemroot%%\temp\*drvceo*"
del /s /q /f "%systemroot%%\temp\*.*"
del /s /q /f "C:\Users\user\AppData\Roaming\Microsoft\Windows\Recent\Sysceo.lnk"
rd /s /q "%systemroot%%\temp\sysceo"
rd /s /q "%systemroot%%\temp\~DrvCeoLog"
rd /s /q "%systemroot%%\temp\~ScLog"
REM 清理暫存目錄
rd /s /q "%TEMP%"
md "%TEMP%"
echo "清理完成"
rem 刪除文件本身
rem del %0
c:\windows\system32\shutdown /r /t 10 |
|