cmd /c "net stop bits"
cmd /c "net stop wuauserv"
cmd /c "net stop appidsvc"
cmd /c "net stop cryptsvc"
cmd /c "net stop DcomLaunch"
cmd /c "taskkill /im wuauclt.exe /f"
cmd /c "icacls "%SYSTEMROOT%\SoftwareDistribution" /q /c /t /reset"
cmd /c "takeown /F "%SYSTEMROOT%\SoftwareDistribution""
cmd /c "icacls "%SYSTEMROOT%\SoftwareDistribution" /grant "Everyone":F"
cmd /c "attrib -r -s -h /s /d "%SYSTEMROOT%\SoftwareDistribution""
cmd /c "attrib -r -s -h /s /d "%SYSTEMROOT%\SoftwareDistribution\DeliveryOptimization""
cmd /c "rmdir /s /q "%SYSTEMROOT%\SoftwareDistribution""
cmd /c "sc.exe sdset wuauserv D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)"
cmd /c "sc.exe sdset bits D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)"
cmd /c "sc.exe sdset cryptsvc D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)"
cmd /c "sc.exe sdset trustedinstaller D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)"
cmd /c "regsvr32.exe /s atl.dll"
cmd /c "regsvr32.exe /s urlmon.dll"
cmd /c "regsvr32.exe /s mshtml.dll"
cmd /c "regsvr32.exe /s shdocvw.dll"
cmd /c "regsvr32.exe /s browseui.dll"
cmd /c "regsvr32.exe /s jscript.dll"
cmd /c "regsvr32.exe /s vbscript.dll"
cmd /c "regsvr32.exe /s scrrun.dll"
cmd /c "regsvr32.exe /s msxml.dll"
cmd /c "regsvr32.exe /s msxml3.dll"
cmd /c "regsvr32.exe /s msxml6.dll"
cmd /c "regsvr32.exe /s actxprxy.dll"
cmd /c "regsvr32.exe /s softpub.dll"
cmd /c "regsvr32.exe /s wintrust.dll"
cmd /c "regsvr32.exe /s dssenh.dll"
cmd /c "regsvr32.exe /s rsaenh.dll"
cmd /c "regsvr32.exe /s gpkcsp.dll"
cmd /c "regsvr32.exe /s sccbase.dll"
cmd /c "regsvr32.exe /s slbcsp.dll"
cmd /c "regsvr32.exe /s cryptdlg.dll"
cmd /c "regsvr32.exe /s oleaut32.dll"
cmd /c "regsvr32.exe /s ole32.dll"
cmd /c "regsvr32.exe /s shell32.dll"
cmd /c "regsvr32.exe /s initpki.dll"
cmd /c "regsvr32.exe /s wuapi.dll"
cmd /c "regsvr32.exe /s wuaueng.dll"
cmd /c "regsvr32.exe /s wuaueng1.dll"
cmd /c "regsvr32.exe /s wucltui.dll"
cmd /c "regsvr32.exe /s wups.dll"
cmd /c "regsvr32.exe /s wups2.dll"
cmd /c "regsvr32.exe /s wuweb.dll"
cmd /c "regsvr32.exe /s qmgr.dll"
cmd /c "regsvr32.exe /s qmgrprxy.dll"
cmd /c "regsvr32.exe /s wucltux.dll"
cmd /c "regsvr32.exe /s muweb.dll"
cmd /c "regsvr32.exe /s wuwebv.dll"
cmd /c "netsh winsock reset"
cmd /c "netsh winhttp reset proxy"
cmd /c "sc.exe config wuauserv start= auto"
cmd /c "sc.exe config bits start= delayed-auto"
cmd /c "sc.exe config cryptsvc start= auto"
cmd /c "sc.exe config TrustedInstaller start= demand"
cmd /c "sc.exe config DcomLaunch start= auto"
cmd /c "net start bits"
cmd /c "net start wuauserv"
cmd /c "net start appidsvc"
cmd /c "net start cryptsvc"
cmd /c "net start DcomLaunch"
Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "..\..\Program Files\WindowsApps\*Microsoft.NET.Native.Framework*\AppxManifest.xml"
Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "..\..\Program Files\WindowsApps\*Microsoft.NET.Native.Runtime*\AppxManifest.xml"
Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "..\..\Program Files\WindowsApps\*Microsoft.VCLibs*\AppxManifest.xml"
Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "..\..\Program Files\WindowsApps\*Microsoft.Advertising*\AppxManifest.xml"
Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "..\..\Program Files\WindowsApps\*Microsoft.Services.Store*\AppxManifest.xml"
Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "..\..\Program Files\WindowsApps\*Microsoft.StorePurchaseApp*\AppxManifest.xml"
Get-AppxPackage -AllUsers |Where-Object {$_.InstallLocation -like "*SystemApps*"} | Foreach {Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "$($_.InstallLocation)\AppxMetadata\AppxBundleManifest.xml"}
Get-AppxPackage -AllUsers |Where-Object {$_.InstallLocation -like "*SystemApps*"} | Foreach {Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "$($_.InstallLocation)\AppxManifest.xml"}
Get-AppxPackage -AllUsers |Where-Object {$_.InstallLocation -like "*WindowsApps*"} | Foreach {Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "$($_.InstallLocation)\AppxMetadata\AppxBundleManifest.xml"}
Get-AppxPackage -AllUsers |Where-Object {$_.InstallLocation -like "*WindowsApps*"} | Foreach {Add-AppxPackage -DisableDevelopmentMode -ForceApplicationShutdown -Register "$($_.InstallLocation)\AppxManifest.xml"}
cmd /c "wsreset"
pause>nul