|
本帖最后由 ljq0527 于 2024-8-18 00:04 编辑
我这有个批处理专门解决这个问题,忘记出处了。论坛好奇怪,居然不能上传让人和zip附件,我的权限能上传2m以内的,但是我传个几十kb的都不行,没办法只能批处理代码帖出来你自己复制了保存成bat文件运行就是了,批处理代码如下:
@ECHO OFF
>NUL 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
IF '%errorlevel%' NEQ '0' (
GOTO UACPrompt
) ELSE ( GOTO gotAdmin )
:UACPrompt
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
ECHO UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
EXIT /B
:gotAdmin
IF EXIST "%temp%\getadmin.vbs" ( DEL "%temp%\getadmin.vbs" )
TITLE EOSNotify-清理 nat.ee
CLS
ECHO 网址:nat.ee
ECHO 荣耀-制作
ECHO QQ:1800619
TIMEOUT 3 >NUL
SET winsxs=%SystemRoot%\winsxs
ECHO.
ECHO 清理EOSNotify WinSXS...
FOR /f %%i IN ('dir /b %winsxs%\^|findstr ".*microsoft-windows-eosnotify.*"') DO (
takeown /a /r /d Y /f "%winsxs%\%%i" >NUL
icacls "%winsxs%\%%i" /T /C /grant administrators:D >NUL
ECHO 正在删除WinSXS
ECHO %%i
RMDIR /s /q "%winsxs%\%%i"
)
ECHO.
ECHO 清理EOSNotify manifest...
FOR /f %%i IN ('dir /b %winsxs%\Manifests^|findstr ".*microsoft-windows-eosnotify.*\.manifest"') DO (
takeown /a /f "%winsxs%\Manifests\%%i" >NUL
icacls "%winsxs%\Manifests\%%i" /grant administrators:D >NUL
DEL /F /S /Q "%winsxs%\Manifests\%%i"
)
TIMEOUT 3 >NUL
ECHO.
ECHO 删除EOSNotify 注册表...
FOR /f %%i IN ('REG QUERY HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Winners^|findstr ".*microsoft-windows-eosnotify.*"') DO (
ECHO 正在删除注册表
reg delete %%i /f
)
TIMEOUT 3 >NUL
ECHO.
ECHO 删除EOSNotify计划任务...
schtasks /delete /tn "\Microsoft\Windows\Setup\EOSNotify" /f
schtasks /delete /tn "\Microsoft\Windows\Setup\EOSNotify2" /f
TIMEOUT 3 >NUL
IF EXIST "%SystemRoot%\System32\EOSNotify.exe" (
ECHO.
ECHO 删除 EOSNotify.exe 文件...
taskkill /F /IM "%SystemRoot%\System32\EOSNotify.exe" 1>NUL 2>NUL
takeown /a /f "%SystemRoot%\System32\EOSNotify.exe" >NUL
icacls "%SystemRoot%\System32\EOSNotify.exe" /grant administrators:D >NUL
DEL /F /S /Q "%SystemRoot%\System32\EOSNotify.exe"
)
IF EXIST "%SystemRoot%\Migration\WTR\EOSNotifyMig.inf" (
ECHO.
ECHO 删除 EOSNotifyMig.inf 文件...
DEL /F /S /Q "%SystemRoot%\Migration\WTR\EOSNotifyMig.inf"
)
TIMEOUT 3 >NUL
ECHO.
ECHO 优化EOSNotify 注册表设置...
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SipNotify" /v "DontRemindMe" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Gwx" /v "DisableGwx" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "DisableOSUpgrade" /t REG_DWORD /d "1" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\EOSNOTIFY.EXE" /v "Debugger" /t REG_SZ /d "*" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SIPNOTIFY.EXE" /v "Debugger" /t REG_SZ /d "*" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\EOSNotify" /v "DiscontinueEOS" /t REG_DWORD /d "1" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\EOSNotify" /v "Discontinue" /t REG_DWORD /d "1" /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\EOSNotify" /v "LastRunTimestamp" /f
TIMEOUT 3 >NUL
ECHO.
ECHO 按任意键退出……
PAUSE >NUL
EXIT
|
|