Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cd\
- fsutil resource setautoreset true C:\
- echo "Resetting Attributes"
- secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose
- Echo "Registering Important Windows Files"
- REGSVR32 VBSCRIPT.DLL /S
- REGSVR32 JSCRIPT.DLL /S
- REGSVR32 SCRRUN.DLL /S
- REGSVR32 DISPEX.DLL /S
- REGSVR32 MSSCRIPT.DLL /S
- REGSVR32 SOFTPUB.DLL /S
- REGSVR32 WINTRUST.DLL /S
- REGSVR32 INITPKI.DLL /S
- REGSVR32 URLMON.DLL /S
- REGSVR32 DSSENH.DLL /S
- REGSVR32 MSXML.DLL /S
- REGSVR32 MSXML2.DLL /S
- REGSVR32 MSXML3.DLL /S
- REGSVR32 RSAENH.DLL /S
- REGSVR32 GPKCSP.DLL /S
- REGSVR32 SCCBASE.DLL /S
- REGSVR32 SLBCSP.DLL /S
- REGSVR32 CRYPTDLG.DLL /S
- REGSVR32 MSSIP32.DLL /S
- sc config "trustedinstaller" start= auto
- sc config "bits" start= auto
- sc config "cryptsvc" start= auto
- sc config "W32Time" start= auto
- echo "Stopping Services"
- net stop wuauserv
- net stop bits
- Net Stop cryptsvc
- REGSVR32 C:\WINDOWS\SYSTEM32\WUAUENG.DLL /S
- REGSVR32 C:\WINDOWS\SYSTEM32\WUAUENG1.DLL /S
- REGSVR32 C:\WINDOWS\SYSTEM32\WUAPI.DLL /S
- REGSVR32 C:\WINDOWS\SYSTEM32\ATL.DLL /S
- REGSVR32 C:\WINDOWS\SYSTEM32\WUCLTUI.DLL /S
- REGSVR32 C:\WINDOWS\SYSTEM32\WUPS.DLL /S
- REGSVR32 C:\WINDOWS\SYSTEM32\IUENGINE.DLL /S
- REGSVR32 C:\WINDOWS\SYSTEM32\WUWEB.DLL /S
- Reg delete HKLM\Components /v PendingXmldentifier
- Reg delete HKLM\Components /v NextQueueEntryIndex
- Reg delete HKLM\Components /v AdvancedInstallersNeedResolving
- Reg delete HKLM\COMPONENTS /v StoreDirty
- Reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /f
- reg delete "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer" /f
- Echo "Taking Ownership"
- takeown /f %systemroot%\winsxs\Temp /r
- takeown /f %systemroot%\winsxs\pending.xml
- takeown /f %systemroot%\winsxs\pending.grl
- takeown /f %systemroot%\SoftwareDistribution /r
- takeown /f %systemroot%\system32\catroot2 /r
- Echo "Giving Permissions to the necessary folders"
- cacls %systemroot%\winsxs\Temp /g "everyone":f /t
- cacls %systemroot%\winsxs\pending.xml /g everyone:f
- cacls %systemroot%\winsxs\pending.grl /g everyone:f
- cacls %systemroot%\SoftwareDistribution /g "everyone":f
- cacls %systemroot%\system32\catroot2 /g "everyone":f
- attrib -r -s -h "%LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files" /s /d
- rd /s /q %LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files
- md %LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files /s
- attrib +s +h "%LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files" /s /d
- echo "Clearing corrupted windows updates history"
- del %systemroot%\winsxs\Temp /s /f /q
- rd /s /q %systemroot%\winsxs\Temp\PendingRenames
- rd /s /q %systemroot%\winsxs\Temp\PendingDeletes
- del %systemroot%\winsxs\pending.xml
- del %systemroot%\winsxs\pending.grl
- rd /s /q %systemroot%\softwaredistribution
- Echo "Deleted Software Ditribution Sucessfully"
- rd /s /q %systemroot%\system32\catroot2
- Echo "Deleted catroot2 Sucessfully"
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement