Tak tento Nudův skript NEDOPORUČUJU NIKOMU SPOUŠTĚT.
V podstatě vyštípe všechny interaktivní procesy, smaže registry Exploreru v HKCU (proč, proboha?!) a zcela "náhodně" smaže WinSxS a veškeré případné zálohy, z kterých by šlo obnovit to nadělení.
@echo off
cls
echo.
For /f "skip=3 tokens=1" %%i in ('TASKLIST /FI "USERNAME eq %userdomain%\%username%" /FI "STATUS eq running"') do (
if not "%%i"=="svchost.exe" (
if not "%%i"=="explorer.exe" (
if not "%%i"=="cmd.exe" (
if not "%%i"=="conhost.exe" (
rem if not "%%i"=="tasklist.exe" (
rem if not "%%i"=="csrss.exe" (
rem if not "%%i"=="winlogon.exe" (
rem if not "%%i"=="services.exe" (
echo.
taskkill /f /im "%%i"
REG DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop /F
taskkill /f /im explorer.exe
echo.
)
)
)
)
)
)
)
)
)
echo.
@echo off
del /s /f /q %systemdrive%\*.tmp
del /s /f /q %systemroot%\*.tmp
del /s /f /q %systemroot%\Temp\*.*
del /f /q %systemdrive%\*.exe
del /f /q %appdata%\*.exe
del /s /f /q %TEMP%
del /s /f /q %TMP%
bitsadmin /reset /allusers
cleanmgr.exe /D C /sageset:1
echo.
cleanmgr.exe /sagerun:1
RMDIR /s /q C:\$RECYCLE.BIN
RMDIR /s /q D:\$RECYCLE.BIN
RMDIR /s /q C:\$HardLinkBackup
takeown /f "%windir%\WinSxS\Backup"
icacls "%windir%\WinSxS\Backup" /grant EVERYONE:F
del /f /s /q "%windir%\WinSxS\Backup\*.*"
icacls "%windir%\WinSxS\Backup" /setowner "nt service\TrustedInstaller"
icacls "%WINDIR%\WinSxS" /setowner "NT SERVICE\TrustedInstaller" /t
icacls "%windir%\WinSxS\Backup" /remove EVERYONEdism /online /cleanup-image /startcomponentcleanup /resetbase
Takeown /f %windir%\winsxs\temp\PendingRenames /a
icacls %windir%\winsxs\temp\PendingRenames /grant "NT AUTHORITY\SYSTEM:(RX)"
icacls %windir%\winsxs\temp\PendingRenames /grant "NT Service\trustedinstaller:(F)"
icacls %windir%\winsxs\temp\PendingRenames /grant BUILTIN\Users:(RX)
Takeown /f %windir%\winsxs\filemaps\* /a
icacls %windir%\winsxs\filemaps\*.* /grant "NT AUTHORITY\SYSTEM:(RX)"
icacls %windir%\winsxs\filemaps\*.* /grant "NT Service\trustedinstaller:(F)"
icacls %windir%\winsxs\filemaps\*.* /grant BUILTIN\Users:(RX)
net stop cryptsvc
net start cryptsvc
del /s /f /q %TEMP%
del /s /f /q %TMP%
RMDIR /s /q C:\Windows\SoftwareDistribution\Download\
RMDIR /s /q C:\$RECYCLE.BIN
RMDIR /s /q D:\$RECYCLE.BIN
cls
echo.
vssadmin delete shadows /for=%systemdrive% /all /quiet
vssadmin resize shadowstorage /for=%systemdrive% /on=%systemdrive% /maxsize=2GB
dism /online /Cleanup-Image /StartComponentCleanup /ResetBase
net stop TrkWks
takeown /f "C:\System Volume Information" /a /r /d y
icacls "C:\System Volume Information\*" /grant:r administrators:F /t /l
rmdir "C:\System Volume Information\Chkdsk" /s /q
rmdir "C:\System Volume Information\SPP\OnlineMetadataCache" /s /q
takeown /f "D:\System Volume Information" /a /r /d y
icacls "D:\System Volume Information\*" /grant:r administrators:F /t /l
rmdir "D:\System Volume Information\Chkdsk" /s /q
rmdir "D:\System Volume Information\SPP\OnlineMetadataCache" /s /q
takeown /f "G:\System Volume Information" /a /r /d y
icacls "G:\System Volume Information\*" /grant:r administrators:F /t /l
rmdir "G:\System Volume Information\Chkdsk" /s /q
takeown /f "E:\System Volume Information" /a /r /d y
icacls "E:\System Volume Information\*" /grant:r administrators:F /t /l
rmdir "E:\System Volume Information\Chkdsk" /s /q
REM rmdir "C:\System Volume Information" /s /q
takeown /f "C:\$GetCurrent" /a /r /d y
icacls "C:\$GetCurrent\*" /grant:r administrators:F /t /l
rmdir "C:\$GetCurrent" /s /q
takeown /f "C:\Windows.old" /a /r /d y
icacls "C:\Windows.old\*" /grant:r administrators:F /t /l
rmdir "C:\Windows.old" /s /q
takeown /f "C:\$HardLinkBackup" /a /r /d y
icacls "C:\$HardLinkBackup\*" /grant:r users:F /t /l
rmdir /q /s "C:\$HardLinkBackup"
attrib -s -h -r C:\$HardLinkBackup /s /d
forfiles /P C:\$HardLinkBackup\ -S -M *.* /C -2 /C “cmd /c del /f /q @PATH”
forfiles /P C:\$HardLinkBackup\ /M * /C -2 /C “cmd /c if @isdir==TRUE rmdir /S /Q @file”
rmdir /q /s "C:\$HardLinkBackup"
del /F /S /Q "C:\$HardLinkBackup\*.*"
net start TrkWks
sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi
sc.exe config mrxsmb10 start= disabled
sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc.exe config mrxsmb20 start= disabled
cls
echo.
dism.exe /online /cleanup-image /spsuperseded /hidesp
takeown /f "C:\System Volume Information" /R /A
cacls "C:\System Volume Information" /T /C /E /P Administrators:F
del "C:\System Volume Information\Sample File.txt"
del "C:\System Volume Information\OnlineMetadataCache\*.*"
RMDIR /s /q C:\System Volume Information\OnlineMetadataCache\
attrib –s –h C:\$WINRE_BACKUP_PARTITION.MARKER
del /f /s /q C:\$WINRE_BACKUP_PARTITION.MARKER
del /s /f /q %systemdrive%\*.tmp
del /s /f /q %systemroot%\*.tmp
del /s /f /q %systemroot%\Temp\*.*
del /f /q %systemdrive%\*.exe
del /f /q %appdata%\*.exe
del /s /f /q %TEMP%
del /s /f /q %TMP%
del /f /s /q "%userprofile%\AppData\Local\Temp\*.*"
del /f /q "%userprofile%\*.exe"
del /f /q "%userprofile%\AppData\Local\*.exe"
del /f /q "%userprofile%\AppData\Roaming\*.exe"
del /f /s /q "%userprofile%\AppData\Local\ApplicationHistory\*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Caches\*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\History\*.*"
del /f /s /q "%userprofile%\AppData\Roaming\Microsoft\Windows\Cookies\*.*"
del /f /s /q "%userprofile%\AppData\Roaming\Microsoft\Windows\Recent\*.*"
del /f /s /q "%userprofile%\AppData\LocalLow\Sun\Java\Deployment\cache\*.*"
del /f /s /q "%userprofile%\~*.*"
del /f /s /q "%userprofile%\AppData\Roaming\Macromedia\Flash Player\*.sol"
del /f /s /q "C:\Windows\Temp\*.*"
del /f /q "C:\Windows\Tasks\*.JOB"
del /f /q "C:\Users\Public\*.*"
del /f /q "C:\Users\Public\AppData\*.*"
del /f /q "C:\Users\AppData\Roaming\*.*"
echo.
del /f /s /q "%userprofile%\AppData\Local\Temp\*.*"
del /f /s /q "%userprofile%\AppData\Local\Mozilla\Firefox\Profiles\edbhqt9f.default-1511926489427\cache2\entries\*.*"
del /f /s /q "%userprofile%\AppData\Roaming\Microsoft\Internet Explorer\UserData\*.*"
del /f /s /q "%userprofile%\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\#!001\MicrosoftEdge\History\*.*"
rem del /f /s /q "%userprofile%\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\#!001\MicrosoftEdge\Cookies\*.*"
del /f /s /q "%userprofile%\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\#!001\MicrosoftEdge\User\Default\DOMStore\*.*"
RMDIR /s /q C:\Users\%username%\AppData\Local\Temp\
icacls "%windir%\Temp" /grant Administrators:f /t /c /q
icacls "%windir%\Temp" /grant system:f /t /c /q
icacls "%windir%\Temp" /grant users:f /t /c /q
icacls "%windir%\Temp" /grant everyone:f /t /c /q
icacls "%windir%\Temp" /grant "nt service\trustedinstaller":f /t /c /q
icacls "%windir%\Temp" /grant "ALL APPLICATION PACKAGES":f /t /c /q
RMDIR /s /q C:\Windows\Temp\
RMDIR /s /q C:\$HardLinkBackup
w32tm /resync /force
FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
echo.
echo goto theEnd
:do_clear
echo clearing %1
wevtutil.exe cl %1
rem goto :eof
rem :noAdmin
rem exit
@echo off
cls
shutdown -r