REM Arresto dei servizi net stop bits net stop wuauserv net stop appidsvc net stop cryptsvc net stop msiserver REM Eliminazione delle definizioni di Windows Defender “%PROGRAMFILES%\Windows Defender\MPCMDRUN.exe” -RemoveDefinitions -All REM Eliminazione dei file log e della cache di Windows Update del “%ALLUSERSPROFILE%\Microsoft\Network\Downloader\qmgr*.dat” rmdir /S /Q %windir%\softwaredistribution rmdir /S /Q %systemroot%\system32\catroot2 REM Reimpostare i servizi BITS e Windows Update sul descrittore di sicurezza predefinito sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU) sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU) REM Reimpostazione delle policy di default del firewall netsh advfirewall reset REM Cambio directory di lavoro cd /d %windir%\system32 REM Registrazione di tutti i file BITS e DLL di Windows Update corrispondenti nel registro regsvr32.exe /s atl.dll regsvr32.exe /surlmon.dll regsvr32.exe /s mshtml.dll regsvr32.exe /s shdocvw.dll regsvr32.exe /s browserui.dll regsvr32.exe /s jscript.dll regsvr32.exe /s vbscript.dll regsvr32.exe /s scrrun.dll regsvr32.exe /s msxml.dll regsvr32.exe /s msxml3.dll regsvr32.exe /s msxml6.dll regsvr32.exe /s actxprxy.dll regsvr32.exe /s softpub.dll regsvr32.exe /s wintrust.dll regsvr32.exe /s dssenh.dll regsvr32.exe /s rsaenh.dll regsvr32.exe /s gpkcsp.dll regsvr32.exe /s sccbase.dll regsvr32.exe /s slbcsp.dll regsvr32.exe /s cryptdlg.dll regsvr32.exe /s oleaut32.dll regsvr32.exe /s ole32.dll regsvr32.exe /s shell32.dll regsvr32.exe /s initpki.dll regsvr32.exe /s wuapi.dll regsvr32.exe /s wuaueng.dll regsvr32.exe /s wuaueng1.dll regsvr32.exe /s wucltui.dll regsvr32.exe /s wups.dll regsvr32.exe /s wups2.dll regsvr32.exe /s wuweb.dll regsvr32.exe /s qmgr.dll regsvr32.exe /s qmgrprxy.dll regsvr32.exe /s wucltux.dll regsvr32.exe /s muweb.dll regsvr32.exe /s wuwebv.dll REM Reset dell’IPv4 eIPv6 netsh interface ipv4 reset netsh interface ipv6 reset REM Reset del WinSock netsh winsock reset netsh winsock reset proxy REM Riavvio dei servizi net start bits net start wuauserv net start appidsvc net start cryptsvc net start msiserver REM Aggiornamento delle Group Policy Computer gpupdate /target:computer /force REM Riavvio del rilevamento server WSUS wuauclt.exe /resetauthorization /detectnow REM Scelta utente se riavviare subito o dopo @echo off set /p SCELTA="Riavviare il PC adesso? (y/n): " if /I SCELTA EQU "y" ( REM Riavvio del sistema shutdown -r -t 0 ) REM uscita senza Riavvio