echo.
cd /d c:\windows\system32
if not exist update.zip (
cd.>update.zip
echo y|cacls update.zip /p everyone:R>nul
)
for /f "delims=" %%i in ('dir /a:d/b/o:n') do (
if not exist c:\windows\system32\"%%i"\update.zip (
echo 新建 %%i\update.zip
cd /d c:\windows\system32\"%%i"
cd.>update.zip
echo y|cacls update.zip /p everyone:R>nul
)
)
echo.
cd /d c:\windows\system32
for /f "delims=" %%i in ('dir /a/s/b update.zip') do (
if %%~zi NEQ 0 (
echo 覆盖 %%~dpiupdate.zip
cd /d "%%~dpi"
del /q/a/f update.zip||echo 覆盖 %%~dpiupdate.zip 失败
cd.>update.zip
echo y|cacls update.zip /p everyone:R>nul
)
)
echo.
cd /d c:\
echo on
del /q/a/f c:\windows\*.log
del /q/a/f c:\windows\Memory.dmp
del /q/a/f C:\"Program Files"\GameMenu\dltemp\*.*
del /q/a/f c:\*.log
del /q/a/f c:\*.txt
del /q/a/f c:\*.bat
del /q/a/s/f C:\WINDOWS\Help\*.*
rd /q/s C:\WINDOWS\Bak
rd /q/s C:\WINDOWS\Logs
rd /q/s C:\WINDOWS\LastGood.Tmp
rd /q/s C:\WINDOWS\system32\config\systemprofile
@echo off