Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. cd\
  2. fsutil resource setautoreset true C:\
  3. echo "Resetting Attributes"
  4. secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose
  5.  
  6. Echo "Registering Important Windows Files"
  7.  
  8. REGSVR32 VBSCRIPT.DLL /S
  9. REGSVR32 JSCRIPT.DLL /S
  10. REGSVR32 SCRRUN.DLL /S
  11. REGSVR32 DISPEX.DLL /S
  12. REGSVR32 MSSCRIPT.DLL /S
  13. REGSVR32 SOFTPUB.DLL /S
  14. REGSVR32 WINTRUST.DLL /S
  15. REGSVR32 INITPKI.DLL /S
  16. REGSVR32 URLMON.DLL /S
  17. REGSVR32 DSSENH.DLL /S
  18. REGSVR32 MSXML.DLL /S
  19. REGSVR32 MSXML2.DLL /S
  20. REGSVR32 MSXML3.DLL /S
  21. REGSVR32 RSAENH.DLL /S
  22. REGSVR32 GPKCSP.DLL /S
  23. REGSVR32 SCCBASE.DLL /S
  24. REGSVR32 SLBCSP.DLL /S
  25. REGSVR32 CRYPTDLG.DLL /S
  26. REGSVR32 MSSIP32.DLL /S
  27.  
  28. sc config "trustedinstaller" start= auto
  29. sc config "bits" start= auto
  30. sc config "cryptsvc" start= auto
  31. sc config "W32Time" start= auto
  32.  
  33. echo "Stopping Services"
  34. net stop wuauserv
  35. net stop bits
  36. Net Stop cryptsvc
  37.  
  38. REGSVR32 C:\WINDOWS\SYSTEM32\WUAUENG.DLL /S
  39. REGSVR32 C:\WINDOWS\SYSTEM32\WUAUENG1.DLL /S
  40. REGSVR32 C:\WINDOWS\SYSTEM32\WUAPI.DLL /S
  41. REGSVR32 C:\WINDOWS\SYSTEM32\ATL.DLL /S
  42. REGSVR32 C:\WINDOWS\SYSTEM32\WUCLTUI.DLL /S
  43. REGSVR32 C:\WINDOWS\SYSTEM32\WUPS.DLL /S
  44. REGSVR32 C:\WINDOWS\SYSTEM32\IUENGINE.DLL /S
  45. REGSVR32 C:\WINDOWS\SYSTEM32\WUWEB.DLL /S
  46.  
  47. Reg delete HKLM\Components /v PendingXmldentifier
  48. Reg delete HKLM\Components /v NextQueueEntryIndex
  49. Reg delete HKLM\Components /v AdvancedInstallersNeedResolving
  50. Reg delete HKLM\COMPONENTS /v StoreDirty
  51. Reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /f
  52. reg delete "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer" /f
  53.  
  54. Echo "Taking Ownership"
  55.  
  56. takeown /f %systemroot%\winsxs\Temp /r
  57. takeown /f %systemroot%\winsxs\pending.xml
  58. takeown /f %systemroot%\winsxs\pending.grl
  59. takeown /f %systemroot%\SoftwareDistribution /r
  60. takeown /f %systemroot%\system32\catroot2 /r
  61.  
  62. Echo "Giving Permissions to the necessary folders"
  63.  
  64. cacls %systemroot%\winsxs\Temp /g "everyone":f /t
  65. cacls %systemroot%\winsxs\pending.xml /g everyone:f
  66. cacls %systemroot%\winsxs\pending.grl /g everyone:f
  67. cacls %systemroot%\SoftwareDistribution /g "everyone":f
  68. cacls %systemroot%\system32\catroot2 /g "everyone":f
  69.  
  70.  
  71. attrib -r -s -h "%LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files" /s /d
  72. rd /s /q %LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files
  73. md %LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files /s
  74. attrib +s +h "%LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files" /s /d
  75.  
  76. echo "Clearing corrupted windows updates history"
  77.  
  78. del %systemroot%\winsxs\Temp /s /f /q
  79. rd /s /q %systemroot%\winsxs\Temp\PendingRenames
  80. rd /s /q %systemroot%\winsxs\Temp\PendingDeletes
  81. del %systemroot%\winsxs\pending.xml
  82. del %systemroot%\winsxs\pending.grl
  83. rd /s /q %systemroot%\softwaredistribution
  84. Echo "Deleted Software Ditribution Sucessfully"
  85. rd /s /q %systemroot%\system32\catroot2
  86. Echo "Deleted catroot2 Sucessfully"
  87. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement