Advertisement
IntergalacticApps

Make Windows 10 Great Again PE - stop Windows 10 spying!

Jun 17th, 2016
2,806
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 50.00 KB | None | 0 0
  1. @echo off
  2. setlocal EnableDelayedExpansion
  3.  
  4. ver | find "10." > nul
  5. if errorlevel 1 (
  6.     echo Your Windows version is not Windows 10... yet. Brace yourself, Windows 10 is coming^^!
  7.     pause
  8.     exit
  9. )
  10.  
  11. echo Make Windows 10 Great Again^^! Paranoid Edition. Ultimate batch spyware and trash remover, v. 2.3
  12. echo Optimized for Creators Update.
  13.  
  14. :parse
  15. if "%~1"=="" goto endparse
  16. if "%~1"=="--help" (
  17.     echo.
  18.     echo Command line arguments:
  19.     echo --dnr-biometrics - do not remove biometrics
  20.     echo --help - display help
  21.     pause
  22.     exit
  23. )
  24. if "%~1"=="--dnr-biometrics" (
  25.     set dnr_biometrics=1
  26. )
  27. shift
  28. goto parse
  29. :endparse
  30.  
  31. pause
  32.  
  33. echo.
  34. echo | set /p=Checking permissions...
  35. net session >nul 2>&1
  36. if errorlevel 1 (
  37.     echo Permission denied. Run this script as administrator.
  38.     pause
  39.     exit
  40. ) else (
  41.     echo OK.
  42.     timeout /t 1 > nul
  43. )
  44.  
  45. reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v "ProductName" | find "LTSB" > nul
  46. if not errorlevel 1 (
  47.     set LTSB=1
  48. )
  49.  
  50. whoami /groups | find "Everyone" > nul
  51. if not errorlevel 1 (
  52.     set eng=1
  53. )
  54.  
  55. if not defined LTSB (
  56.     cls
  57.     echo Deleting trash apps...
  58.     powershell -Command "& {Get-AppxPackage -AllUsers | Remove-AppxPackage; Get-AppxProvisionedPackage -Online | Remove-AppxProvisionedPackage -Online;}"
  59.     takeown /f "%ProgramFiles%\WindowsApps" /r
  60.     icacls "%ProgramFiles%\WindowsApps" /inheritance:e /grant "%UserName%:(OI)(CI)F" /T /C
  61.     for /d %%i in ("%ProgramFiles%\WindowsApps\*") do (
  62.         rd /s /q "%%i"
  63.     )
  64.     icacls "%ProgramFiles%\WindowsApps" /setowner "NT Service\TrustedInstaller"
  65.     icacls "%ProgramFiles%\WindowsApps" /inheritance:r /remove "%UserName%"
  66. )
  67.  
  68. cls
  69. echo Deleting spyware firewall rules...
  70. powershell -Command "& {Get-NetFirewallRule | Where { $_.Group -like '*@{*' } | Remove-NetFirewallRule;}"
  71. powershell -Command "& {Get-NetFirewallRule | Where { $_.Group -eq 'DiagTrack' } | Remove-NetFirewallRule;}"
  72. powershell -Command "& {Get-NetFirewallRule | Where { $_.DisplayGroup -eq 'Delivery Optimization' } | Remove-NetFirewallRule;}"
  73. powershell -Command "& {Get-NetFirewallRule | Where { $_.DisplayGroup -like 'Windows Media Player Network Sharing Service*' } | Remove-NetFirewallRule;}"
  74.  
  75. cls
  76. echo | set /p=Deleting OneDrive...
  77. taskkill /f /im OneDrive.exe > nul 2>&1
  78. if exist %SystemRoot%\System32\OneDriveSetup.exe (
  79.     start /wait %SystemRoot%\System32\OneDriveSetup.exe /uninstall
  80. ) else if exist %SystemRoot%\SysWOW64\OneDriveSetup.exe (
  81.     start /wait %SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall
  82. )
  83. rd "%UserProfile%\OneDrive" /q /s > nul 2>&1
  84. rd "%SystemDrive%\OneDriveTemp" /q /s > nul 2>&1
  85. rd "%LocalAppData%\Microsoft\OneDrive" /q /s > nul 2>&1
  86. rd "%ProgramData%\Microsoft OneDrive" /q /s > nul 2>&1
  87. reg delete "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > nul 2>&1
  88. reg delete "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > nul 2>&1
  89. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSyncNGSC" /t REG_DWORD /d 1 /f > nul
  90. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSync" /t REG_DWORD /d 1 /f > nul
  91. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v "DisableMeteredNetworkFileSync" /t REG_DWORD /d 1 /f > nul
  92. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v "DisableLibrariesDefaultSaveToOneDrive" /t REG_DWORD /d 1 /f > nul
  93. reg add "HKCU\SOFTWARE\Microsoft\OneDrive" /v "DisablePersonalSync" /t REG_DWORD /d 1 /f > nul
  94. echo OK.
  95.  
  96. echo.
  97. echo Deleting spyware/bloatware services...
  98. set spy_services=^
  99.     DiagTrack,dmwappushservice,diagnosticshub.standardcollector.service,DcpSvc,^
  100.     WerSvc,PcaSvc,DoSvc,WMPNetworkSvc,XblAuthManager,XblGameSave,XboxNetApiSvc,^
  101.     xboxgip,wlidsvc,lfsvc,NcbService,LicenseManager,OneSyncSvc,CDPSvc,^
  102.     CDPUserSvc,MapsBroker,PhoneSvc,RetailDemo,WalletService
  103. for %%i in (%spy_services%) do (
  104.     sc query %%i > nul
  105.     if not errorlevel 1060 (
  106.         echo Current service: %%i
  107.         sc stop %%i > nul
  108.         sc delete %%i
  109.         set spy_svc_found=1
  110.     )
  111. )
  112. if not defined spy_svc_found (
  113.     echo No spyware services found.
  114. )
  115.  
  116. echo.
  117. echo Disabling unsafe services...
  118. set unsafe_services=^
  119.     RemoteRegistry,TermService,TrkWks,DPS
  120. for %%i in (%unsafe_services%) do (
  121.     echo Current service: %%i
  122.     sc stop %%i > nul
  123.     sc config %%i start= disabled
  124. )
  125.  
  126. echo.
  127. echo Adding antispy firewall rules...
  128. set spy_ips=^
  129.     204.79.197.200,204.79.197.203,13.107.21.200
  130. for %%i in (%spy_ips%) do (
  131.     netsh advfirewall firewall show rule %%i_BLOCK > nul
  132.         if errorlevel 1 (
  133.             echo | set /p=%%i_BLOCK
  134.             route -p ADD %%i MASK 255.255.255.255 0.0.0.0 > nul 2>&1
  135.             netsh advfirewall firewall add rule name="%%i_BLOCK" dir=out interface=any action=block remoteip=%%i > nul
  136.             set frw_rule_added=1
  137.             echo [OK]
  138.         )
  139. )
  140. set svchost=%SystemRoot%\System32\svchost.exe
  141. set svchost_rules=^
  142.     "VeriSign Global Registry Services;199.7.48.0-199.7.63.255,199.16.80.0-199.16.95.255"^
  143.     "Microsoft Limited;94.245.64.0-94.245.127.255"^
  144.     "Microsoft Internet Data Center;213.199.160.0-213.199.191.255"^
  145.     "Akamai Technologies;92.122.212.0-92.122.219.255,92.123.96.0-92.123.111.255,95.100.0.0-95.100.15.255,23.32.0.0-23.67.255.255"
  146. for %%i in (%svchost_rules%) do (
  147.     for /f "tokens=1,2 delims=;" %%a in (%%i) do (
  148.         netsh advfirewall firewall show rule "%%a SVCHOST_BLOCK" > nul
  149.         if errorlevel 1 (
  150.             echo | set /p=%%a SVCHOST_BLOCK
  151.             netsh advfirewall firewall add rule name="%%a SVCHOST_BLOCK" dir=out interface=any action=block program=%svchost% remoteip=%%b > nul
  152.             set frw_rule_added=1
  153.             echo [OK]
  154.         )
  155.     )
  156. )
  157. set spy_apps=^
  158.     "Program Files\Common Files\microsoft shared\OFFICE16\OLicenseHeartbeat.exe"^
  159.     "Program Files\Microsoft Office\Office16\msoia.exe"^
  160.     "Program Files\Microsoft Office\Office16\MSOSYNC.EXE"^
  161.     "Program Files\Microsoft Office\Office16\MSOUC.EXE"^
  162.     "Program Files\Microsoft Office\Office16\SETLANG.EXE"^
  163.     "Program Files\Microsoft Office\root\Office16\msoia.exe"^
  164.     "Program Files\Microsoft Office\root\Office16\MSOSYNC.EXE"^
  165.     "Program Files\Microsoft Office\root\Office16\MSOUC.EXE"^
  166.     "Program Files\Microsoft Office\root\Office16\SETLANG.EXE"^
  167.     "Program Files (x86)\Common Files\Microsoft Shared\OFFICE16\OLicenseHeartbeat.exe"^
  168.     "Program Files (x86)\Microsoft Office\Office16\msoia.exe"^
  169.     "Program Files (x86)\Microsoft Office\Office16\MSOSYNC.EXE"^
  170.     "Program Files (x86)\Microsoft Office\Office16\MSOUC.EXE"^
  171.     "Program Files (x86)\Microsoft Office\Office16\SETLANG.EXE"^
  172.     "Program Files (x86)\Microsoft Office\root\Office16\msoia.exe"^
  173.     "Program Files (x86)\Microsoft Office\root\Office16\MSOSYNC.EXE"^
  174.     "Program Files (x86)\Microsoft Office\root\Office16\MSOUC.EXE"^
  175.     "Program Files (x86)\Microsoft Office\root\Office16\SETLANG.EXE"^
  176.     "Windows\explorer.exe"^
  177.     "Windows\ImmersiveControlPanel\SystemSettings.exe"^
  178.     "Windows\System32\backgroundTaskHost.exe"^
  179.     "Windows\System32\BackgroundTransferHost.exe"^
  180.     "Windows\System32\browser_broker.exe"^
  181.     "Windows\System32\CompatTelRunner.exe"^
  182.     "Windows\System32\dmclient.exe"^
  183.     "Windows\System32\InstallAgentUserBroker.exe"^
  184.     "Windows\System32\lsass.exe"^
  185.     "Windows\System32\msfeedssync.exe"^
  186.     "Windows\System32\rundll32.exe"^
  187.     "Windows\System32\SettingSyncHost.exe"^
  188.     "Windows\System32\SIHClient.exe"^
  189.     "Windows\System32\smartscreen.exe"^
  190.     "Windows\System32\taskhostw.exe"^
  191.     "Windows\System32\wbem\WmiPrvSE.exe"^
  192.     "Windows\System32\WerFault.exe"^
  193.     "Windows\System32\wermgr.exe"^
  194.     "Windows\System32\wsqmcons.exe"^
  195.     "Windows\System32\WWAHost.exe"^
  196.     "Windows\SystemApps\ContactSupport_cw5n1h2txyewy\ContactSupport.exe"^
  197.     "Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe"^
  198.     "Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\SearchUI.exe"^
  199.     "Windows\SysWOW64\backgroundTaskHost.exe"^
  200.     "Windows\SysWOW64\BackgroundTransferHost.exe"^
  201.     "Windows\SysWOW64\InstallAgentUserBroker.exe"^
  202.     "Windows\SysWOW64\msfeedssync.exe"^
  203.     "Windows\SysWOW64\rundll32.exe"^
  204.     "Windows\SysWOW64\SettingSyncHost.exe"^
  205.     "Windows\SysWOW64\wbem\WmiPrvSE.exe"^
  206.     "Windows\SysWOW64\WerFault.exe"^
  207.     "Windows\SysWOW64\wermgr.exe"^
  208.     "Windows\SysWOW64\WWAHost.exe"
  209. for %%i in (%spy_apps%) do (
  210.     set item=%%i
  211.     set file_path="%SystemDrive%\!item:~1!
  212.     if exist !file_path! (
  213.         echo !file_path! | find "SysWOW64" > nul
  214.         if errorlevel 1 (
  215.             set rule_name=%%~nxi_BLOCK
  216.         ) else (
  217.             set rule_name=%%~nxi-SysWOW64_BLOCK
  218.         )
  219.         netsh advfirewall firewall show rule !rule_name! > nul
  220.         if errorlevel 1 (
  221.             echo | set /p=!rule_name!
  222.             netsh advfirewall firewall add rule name=!rule_name! dir=out interface=any action=block program=!file_path! > nul
  223.             set frw_rule_added=1
  224.             echo [OK]
  225.         )
  226.     )
  227. )
  228. set spy_svc=WSearch
  229. netsh advfirewall firewall show rule %spy_svc%_BLOCK > nul
  230. if errorlevel 1 (
  231.     echo | set /p=%spy_svc%_BLOCK
  232.     netsh advfirewall firewall add rule name="%spy_svc%_BLOCK" dir=out interface=any action=block service=%spy_svc% > nul
  233.     set frw_rule_added=1
  234.     echo [OK]
  235. )
  236. if not defined frw_rule_added (
  237.     echo Antispy rules already present.
  238. )
  239.  
  240. echo.
  241. echo Blocking spyware domains...
  242. set spy_domains=^
  243.     nullroute,^
  244.     statsfe2.update.microsoft.com.akadns.net,fe2.update.microsoft.com.akadns.net,^
  245.     survey.watson.microsoft.com,watson.microsoft.com,^
  246.     watson.ppe.telemetry.microsoft.com,vortex.data.microsoft.com,^
  247.     vortex-win.data.microsoft.com,telecommand.telemetry.microsoft.com,^
  248.     telecommand.telemetry.microsoft.com.nsatc.net,oca.telemetry.microsoft.com,^
  249.     sqm.telemetry.microsoft.com,sqm.telemetry.microsoft.com.nsatc.net,^
  250.     watson.telemetry.microsoft.com,watson.telemetry.microsoft.com.nsatc.net,^
  251.     redir.metaservices.microsoft.com,choice.microsoft.com,^
  252.     choice.microsoft.com.nsatc.net,wes.df.telemetry.microsoft.com,^
  253.     services.wes.df.telemetry.microsoft.com,sqm.df.telemetry.microsoft.com,^
  254.     telemetry.microsoft.com,telemetry.appex.bing.net,telemetry.urs.microsoft.com,^
  255.     settings-sandbox.data.microsoft.com,watson.live.com,statsfe2.ws.microsoft.com,^
  256.     corpext.msitadfs.glbdns2.microsoft.com,www.windowssearch.com,ssw.live.com,^
  257.     sls.update.microsoft.com.akadns.net,i1.services.social.microsoft.com,^
  258.     diagnostics.support.microsoft.com,corp.sts.microsoft.com,^
  259.     statsfe1.ws.microsoft.com,feedback.windows.com,feedback.microsoft-hohm.com,^
  260.     feedback.search.microsoft.com,rad.msn.com,preview.msn.com,^
  261.     df.telemetry.microsoft.com,reports.wes.df.telemetry.microsoft.com,^
  262.     vortex-sandbox.data.microsoft.com,settings.data.microsoft.com,^
  263.     oca.telemetry.microsoft.com.nsatc.net,pre.footprintpredict.com,^
  264.     spynet2.microsoft.com,spynetalt.microsoft.com,win10.ipv6.microsoft.com,^
  265.     fe3.delivery.dsp.mp.microsoft.com.nsatc.net,cache.datamart.windows.com,^
  266.     settings-win.data.microsoft.com,v10.vortex-win.data.microsoft.com,^
  267.     g.msn.com,bat.r.msn.com,apps.skype.com,ieonlinews.microsoft.com,^
  268.     arc.msn.com,rpt.msn.com,client.wns.windows.com,^
  269.     inprod.support.services.microsoft.com,public-family.api.account.microsoft.com,^
  270.     geover-prod.do.dsp.mp.microsoft.com,geo-prod.do.dsp.mp.microsoft.com,^
  271.     kv201-prod.do.dsp.mp.microsoft.com,cp201-prod.do.dsp.mp.microsoft.com,^
  272.     disc201-prod.do.dsp.mp.microsoft.com,array201-prod.do.dsp.mp.microsoft.com,^
  273.     array202-prod.do.dsp.mp.microsoft.com,array203-prod.do.dsp.mp.microsoft.com,^
  274.     array204-prod.do.dsp.mp.microsoft.com,tsfe.trafficshaping.dsp.mp.microsoft.com,^
  275.     disc401-prod.do.dsp.mp.microsoft.com,1.tlu.dl.delivery.mp.microsoft.com,^
  276.     2.tlu.dl.delivery.mp.microsoft.com,3.tlu.dl.delivery.mp.microsoft.com,^
  277.     7.tlu.dl.delivery.mp.microsoft.com,8.tlu.dl.delivery.mp.microsoft.com,^
  278.     cp401-prod.do.dsp.mp.microsoft.com,^
  279.     dl.delivery.mp.microsoft.com,tlu.dl.delivery.mp.microsoft.com,^
  280.     statsfe1-df.ws.microsoft.com,statsfe2-df.ws.microsoft.com,^
  281.     www.bing.com,c.bing.com,g.bing.com,appex.bing.com,dub407-m.hotmail.com,^
  282.     urs.microsoft.com,c.urs.microsoft.com,t.urs.microsoft.com,activity.windows.com,^
  283.     uif.microsoft.com,iecvlist.microsoft.com,ieonline.microsoft.com,c.microsoft.com,^
  284.     nexus.officeapps.live.com,nexusrules.officeapps.live.com,c1.microsoft.com,^
  285.     apprep.smartscreen.microsoft.com,otf.msn.com,c.msn.com,^
  286.     rr.office.microsoft.com,web.vortex.data.microsoft.com,ocsa.office.microsoft.com,^
  287.     ocos-office365-s2s.msedge.net,odc.officeapps.live.com,uci.officeapps.live.com,^
  288.     roaming.officeapps.live.com,urs.smartscreen.microsoft.com,^
  289.     purchase.mp.microsoft.com,displaycatalog.mp.microsoft.com,www.msftconnecttest.com,^
  290.     client-office365-tas.msedge.net,config.edge.skype.com,licensing.mp.microsoft.com,^
  291.     officeclient.microsoft.com,ris.api.iris.microsoft.com
  292. set hosts=%SystemRoot%\System32\drivers\etc\hosts
  293. for %%i in (%spy_domains%) do (
  294.     find /c " %%i" %hosts% > nul
  295.     if errorlevel 1 (
  296.         echo %%i
  297.         echo 0.0.0.0 %%i>>%hosts%
  298.         set hosts_added=1
  299.     )
  300. )
  301. if not defined hosts_added (
  302.     echo Spyware domains already blocked.
  303. ) else (
  304.     echo.
  305.     echo | set /p=Flushing DNS cache
  306.     ipconfig /flushdns > nul
  307.     echo [OK]
  308. )
  309.  
  310. echo.
  311. echo Adding registry tweaks...
  312.  
  313. echo | set /p=Disable telemetry
  314. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f > nul
  315. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f > nul
  316. reg add "HKLM\SYSTEM\ControlSet001\Services\DiagTrack" /v "Start" /t REG_DWORD /d 4 /f > nul
  317. reg add "HKLM\SYSTEM\ControlSet001\Services\dmwappushsvc" /v "Start" /t REG_DWORD /d 4 /f > nul
  318. reg add "HKLM\SYSTEM\CurrentControlSet\Services\dmwappushservice" /v "Start" /t REG_DWORD /d 4 /f > nul
  319. reg add "HKLM\SYSTEM\CurrentControlSet\Services\diagnosticshub.standardcollector.service" /v "Start" /t REG_DWORD /d 4 /f > nul
  320. echo [OK]
  321.  
  322. echo | set /p=Disable Windows Customer Experience Improvement Program
  323. reg add "HKLM\SOFTWARE\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d 0 /f > nul
  324. reg add "HKLM\SOFTWARE\Policies\Microsoft\SQMClient" /v "CorporateSQMURL" /t REG_SZ /d "0.0.0.0" /f > nul
  325. echo [OK]
  326.  
  327. echo | set /p=Disable Application Telemetry
  328. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "AITEnable" /t REG_DWORD /d 0 /f > nul
  329. echo [OK]
  330.  
  331. echo | set /p=Disable Inventory Collector
  332. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "DisableInventory" /t REG_DWORD /d 1 /f > nul
  333. echo [OK]
  334.  
  335. echo | set /p=Disable Steps Recorder
  336. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "DisableUAR" /t REG_DWORD /d 1 /f > nul
  337. echo [OK]
  338.  
  339. echo | set /p=Disable Advertising ID
  340. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  341. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  342. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" /v "DisabledByGroupPolicy" /t REG_DWORD /d 1 /f > nul
  343. echo [OK]
  344.  
  345. echo | set /p=Disable keylogger
  346. reg add "HKCU\SOFTWARE\Microsoft\InputPersonalization" /v "RestrictImplicitInkCollection" /t REG_DWORD /d 1 /f > nul
  347. reg add "HKCU\SOFTWARE\Microsoft\InputPersonalization" /v "RestrictImplicitTextCollection" /t REG_DWORD /d 1 /f > nul
  348. reg add "HKCU\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" /v "HarvestContacts" /t REG_DWORD /d 0 /f > nul
  349. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\TabletPC" /v "PreventHandwritingDataSharing" /t REG_DWORD /d 1 /f > nul
  350. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\HandwritingErrorReports" /v "PreventHandwritingErrorReports" /t REG_DWORD /d 1 /f > nul
  351. echo [OK]
  352.  
  353. echo | set /p=Disable browser access to local language
  354. reg add "HKCU\Control Panel\International\User Profile" /v "HttpAcceptLanguageOptOut" /t REG_DWORD /d 1 /f > nul
  355. echo [OK]
  356.  
  357. echo | set /p=Disable SmartScreen
  358. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v "SmartScreenEnabled" /t REG_SZ /d "Off" /f > nul
  359. reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer" /v "SmartScreenEnabled" /t REG_SZ /d "Off" /f > nul
  360. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" /v "EnableWebContentEvaluation" /t REG_DWORD /d 0 /f > nul
  361. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" /v "EnableWebContentEvaluation" /t REG_DWORD /d 0 /f > nul
  362. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "EnableSmartScreen" /t REG_DWORD /d 0 /f > nul
  363. echo [OK]
  364.  
  365. echo | set /p=Disable Cortana and web search
  366. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowCortana" /t REG_DWORD /d 0 /f > nul
  367. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowSearchToUseLocation" /t REG_DWORD /d 0 /f > nul
  368. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "ConnectedSearchPrivacy" /t REG_DWORD /d 3 /f > nul
  369. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "ConnectedSearchUseWeb" /t REG_DWORD /d 0 /f > nul
  370. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "ConnectedSearchUseWebOverMeteredConnections" /t REG_DWORD /d 0 /f > nul
  371. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "DisableWebSearch" /t REG_DWORD /d 1 /f > nul
  372. reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Experience\AllowCortana" /v "value" /t REG_DWORD /d 0 /f > nul
  373. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CortanaEnabled" /t REG_DWORD /d 0 /f > nul
  374. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "BingSearchEnabled" /t REG_DWORD /d 0 /f > nul
  375. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CortanaEnabled" /t REG_DWORD /d 0 /f > nul
  376. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CanCortanaBeEnabled" /t REG_DWORD /d 0 /f > nul
  377. reg add "HKCU\SOFTWARE\Microsoft\Personalization\Settings" /v "AcceptedPrivacyPolicy" /t REG_DWORD /d 0 /f > nul
  378. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "DeviceHistoryEnabled" /t REG_DWORD /d 0 /f > nul
  379. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "HistoryViewEnabled" /t REG_DWORD /d 0 /f > nul
  380. echo [OK]
  381.  
  382. echo | set /p=Disable Wi-Fi Sense
  383. reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" /v "value" /t REG_DWORD /d 0 /f > nul
  384. reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" /v "value" /t REG_DWORD /d 0 /f > nul
  385. reg add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config" /v "AutoConnectAllowedOEM" /t REG_DWORD /d 0 /f > nul
  386. echo [OK]
  387.  
  388. if not defined dnr_biometrics (
  389.     echo | set /p=Disable biometrics
  390.     reg add "HKLM\SOFTWARE\Policies\Microsoft\Biometrics" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  391.     echo [OK]
  392. )
  393.  
  394. echo | set /p=Disable location access and sensors
  395. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableLocation" /t REG_DWORD /d 1 /f > nul
  396. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableLocationScripting" /t REG_DWORD /d 1 /f > nul
  397. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableSensors" /t REG_DWORD /d 1 /f > nul
  398. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableWindowsLocationProvider" /t REG_DWORD /d 1 /f > nul
  399. reg add "HKLM\SYSTEM\CurrentControlSet\Services\lfsvc" /v "Start" /t REG_DWORD /d 4 /f > nul
  400. reg add "HKLM\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" /v "Status" /t REG_DWORD /d 0 /f > nul
  401. reg add "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Permissions\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v "SensorPermissionState" /t REG_DWORD /d 0 /f > nul
  402. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v "SensorPermissionState" /t REG_DWORD /d 0 /f > nul
  403. echo [OK]
  404.  
  405. echo | set /p=Disable sync
  406. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync" /v "SyncPolicy" /t REG_DWORD /d 5 /f > nul
  407. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Accessibility" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  408. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\AppSync" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  409. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\BrowserSettings" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  410. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Credentials" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  411. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\DesktopTheme" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  412. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  413. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\PackageState" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  414. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Personalization" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  415. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\StartLayout" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  416. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Windows" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  417. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableSettingSync" /t REG_DWORD /d 2 /f > nul
  418. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableSettingSyncUserOverride" /t REG_DWORD /d 1 /f > nul
  419. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableAppSyncSettingSync" /t REG_DWORD /d 2 /f > nul
  420. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableAppSyncSettingSyncUserOverride" /t REG_DWORD /d 1 /f > nul
  421. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableApplicationSettingSync" /t REG_DWORD /d 2 /f > nul
  422. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableApplicationSettingSyncUserOverride" /t REG_DWORD /d 1 /f > nul
  423. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableCredentialsSettingSync" /t REG_DWORD /d 2 /f > nul
  424. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableCredentialsSettingSyncUserOverride" /t REG_DWORD /d 1 /f > nul
  425. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableDesktopThemeSettingSync" /t REG_DWORD /d 2 /f > nul
  426. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableDesktopThemeSettingSyncUserOverride" /t REG_DWORD /d 1 /f > nul
  427. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisablePersonalizationSettingSync" /t REG_DWORD /d 2 /f > nul
  428. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisablePersonalizationSettingSyncUserOverride" /t REG_DWORD /d 1 /f > nul
  429. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableStartLayoutSettingSync" /t REG_DWORD /d 2 /f > nul
  430. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableStartLayoutSettingSyncUserOverride" /t REG_DWORD /d 1 /f > nul
  431. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableSyncOnPaidNetwork" /t REG_DWORD /d 1 /f > nul
  432. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableWebBrowserSettingSync" /t REG_DWORD /d 2 /f > nul
  433. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableWebBrowserSettingSyncUserOverride" /t REG_DWORD /d 1 /f > nul
  434. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableWindowsSettingSync" /t REG_DWORD /d 2 /f > nul
  435. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\SettingSync" /v "DisableWindowsSettingSyncUserOverride" /t REG_DWORD /d 1 /f > nul
  436. echo [OK]
  437.  
  438. echo | set /p=Disable device access for Universal Apps
  439. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{21157C1F-2651-4CC1-90CA-1F28B02263F6}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  440. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{2EEF81BE-33FA-4800-9670-1CD474972C3F}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  441. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{7D7E8402-7C54-4821-A34E-AEEFD62DED93}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  442. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{8BC668CF-7728-45BD-93F8-CF2B3B41D7AB}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  443. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{9231CB4C-BF57-4AF3-8C55-FDA7BFCC04C5}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  444. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{992AFA70-6F47-4148-B3E9-3003349C1548}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  445. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{9D9E0118-1807-4F2E-96E4-2CE57142E196}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  446. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  447. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{B19F89AF-E3EB-444B-8DEA-202575A71599}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  448. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  449. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{C1D23ACC-752B-43E5-8448-8D0E519CD6D6}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  450. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{D89823BA-7180-4B81-B50C-7E471E6121A3}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  451. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{E5323777-F976-4f5b-9B55-B94699C46E44}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  452. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{E6AD100E-5F4E-44CD-BE0F-2265D88D14F5}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  453. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{E83AF229-8640-4D18-A213-E22675EBB2C3}" /v "Value" /t REG_SZ /d "Deny" /f > nul
  454. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\LooselyCoupled" /v "Value" /t REG_SZ /d "Deny" /f > nul
  455. if not defined LTSB (
  456.     set edge_path=HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\S-1-15-2-3624051433-2125758914-1423191267-1740899205-1073925389-3782572162-737981194
  457.     reg add !edge_path!\{2EEF81BE-33FA-4800-9670-1CD474972C3F} /v "Value" /t REG_SZ /d "Deny" /f > nul
  458.     reg add !edge_path!\{E5323777-F976-4f5b-9B55-B94699C46E44} /v "Value" /t REG_SZ /d "Deny" /f > nul
  459. )
  460. set shell_exp_path=HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\S-1-15-2-155514346-2573954481-755741238-1654018636-1233331829-3075935687-2861478708
  461. reg add %shell_exp_path%\{7D7E8402-7C54-4821-A34E-AEEFD62DED93} /v "Value" /t REG_SZ /d "Deny" /f > nul
  462. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessAccountInfo" /t REG_DWORD /d 2 /f > nul
  463. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessCalendar" /t REG_DWORD /d 2 /f > nul
  464. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessCallHistory" /t REG_DWORD /d 2 /f > nul
  465. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessCamera" /t REG_DWORD /d 2 /f > nul
  466. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessContacts" /t REG_DWORD /d 2 /f > nul
  467. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessEmail" /t REG_DWORD /d 2 /f > nul
  468. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessLocation" /t REG_DWORD /d 2 /f > nul
  469. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessMessaging" /t REG_DWORD /d 2 /f > nul
  470. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessMicrophone" /t REG_DWORD /d 2 /f > nul
  471. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessMotion" /t REG_DWORD /d 2 /f > nul
  472. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessNotifications" /t REG_DWORD /d 2 /f > nul
  473. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessPhone" /t REG_DWORD /d 2 /f > nul
  474. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessRadios" /t REG_DWORD /d 2 /f > nul
  475. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessTasks" /t REG_DWORD /d 2 /f > nul
  476. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsAccessTrustedDevices" /t REG_DWORD /d 2 /f > nul
  477. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsGetDiagnosticInfo" /t REG_DWORD /d 2 /f > nul
  478. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsRunInBackground" /t REG_DWORD /d 2 /f > nul
  479. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v "LetAppsSyncWithDevices" /t REG_DWORD /d 2 /f > nul
  480. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SmartGlass" /v "UserAuthPolicy" /t REG_DWORD /d 0 /f > nul
  481. reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableTailoredExperiencesWithDiagnosticData" /t REG_DWORD /d 1 /f > nul
  482. echo [OK]
  483.  
  484. if not defined LTSB (
  485.     echo | set /p=Disable background access for Universal Apps
  486.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.PPIProjection_cw5n1h2txyewy" /v "Disabled" /t REG_DWORD /d 1 /f > nul
  487.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.PPIProjection_cw5n1h2txyewy" /v "DisabledByUser" /t REG_DWORD /d 1 /f > nul
  488.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Windows.ContactSupport_cw5n1h2txyewy" /v "Disabled" /t REG_DWORD /d 1 /f > nul
  489.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Windows.ContactSupport_cw5n1h2txyewy" /v "DisabledByUser" /t REG_DWORD /d 1 /f > nul
  490.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.MicrosoftEdge_8wekyb3d8bbwe" /v "Disabled" /t REG_DWORD /d 1 /f > nul
  491.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.MicrosoftEdge_8wekyb3d8bbwe" /v "DisabledByUser" /t REG_DWORD /d 1 /f > nul
  492.     echo [OK]
  493. )
  494.  
  495. echo | set /p=Disable protected trash services
  496. reg add "HKLM\SYSTEM\CurrentControlSet\Services\PimIndexMaintenanceSvc" /v "Start" /t REG_DWORD /d 4 /f > nul
  497. reg add "HKLM\SYSTEM\CurrentControlSet\Services\UnistoreSvc" /v "Start" /t REG_DWORD /d 4 /f > nul
  498. reg add "HKLM\SYSTEM\CurrentControlSet\Services\UserDataSvc" /v "Start" /t REG_DWORD /d 4 /f > nul
  499. echo [OK]
  500.  
  501. echo | set /p=Disable Windows Defender
  502. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /t REG_DWORD /d 1 /f > nul
  503. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableBehaviorMonitoring" /t REG_DWORD /d 1 /f > nul
  504. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableOnAccessProtection" /t REG_DWORD /d 1 /f > nul
  505. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableScanOnRealtimeEnable" /t REG_DWORD /d 1 /f > nul
  506. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "SpyNetReporting" /t REG_DWORD /d 0 /f > nul
  507. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "SubmitSamplesConsent" /t REG_DWORD /d 2 /f > nul
  508. reg add "HKLM\SOFTWARE\Policies\Microsoft\MRT" /v "DontOfferThroughWUAU" /t REG_DWORD /d 1 /f > nul
  509. reg add "HKLM\SOFTWARE\Policies\Microsoft\MRT" /v "DontReportInfectionInformation" /t REG_DWORD /d 1 /f > nul
  510. reg add "HKLM\SYSTEM\CurrentControlSet\Services\WinDefend" /v "Start" /t REG_DWORD /d 4 /f > nul 2>&1
  511. reg add "HKLM\SYSTEM\CurrentControlSet\Services\WdNisSvc" /v "Start" /t REG_DWORD /d 4 /f > nul 2>&1
  512. reg add "HKLM\SYSTEM\CurrentControlSet\Services\WdNisDrv" /v "Start" /t REG_DWORD /d 4 /f > nul 2>&1
  513. reg add "HKLM\SYSTEM\CurrentControlSet\Services\WdBoot" /v "Start" /t REG_DWORD /d 4 /f > nul 2>&1
  514. reg add "HKLM\SYSTEM\CurrentControlSet\Services\WdFilter" /v "Start" /t REG_DWORD /d 4 /f > nul 2>&1
  515. regsvr32 /s /u "%ProgramFiles%\Windows Defender\shellext.dll"
  516. taskkill /f /im MSASCuiL.exe > nul 2>&1
  517. reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "WindowsDefender" /f > nul 2>&1
  518. reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "SecurityHealth" /f > nul 2>&1
  519. echo [OK]
  520.  
  521. if not defined LTSB (
  522.     echo | set /p=Disable Windows Store
  523.     reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsStore" /v "AutoDownload" /t REG_DWORD /d 2 /f > nul
  524.     reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsStore" /v "DisableStoreApps" /t REG_DWORD /d 1 /f > nul
  525.     reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsStore" /v "RemoveWindowsStore" /t REG_DWORD /d 1 /f > nul
  526.     echo [OK]
  527. )
  528.  
  529. echo | set /p=Disable Delivery Optimization
  530. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization" /v "SystemSettingsDownloadMode" /t REG_DWORD /d 0 /f > nul
  531. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v "DODownloadMode" /t REG_DWORD /d 0 /f > nul
  532. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" /v "DODownloadMode" /t REG_DWORD /d 0 /f > nul
  533. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" /v "SystemSettingsDownloadMode" /t REG_DWORD /d 0 /f > nul
  534. reg add "HKLM\SYSTEM\CurrentControlSet\Services\DoSvc" /v "Start" /t REG_DWORD /d 4 /f > nul
  535. echo [OK]
  536.  
  537. echo | set /p=Disable Program Compatibility Assistant
  538. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "DisablePCA" /t REG_DWORD /d 1 /f > nul
  539. reg add "HKLM\SYSTEM\CurrentControlSet\Services\PcaSvc" /v "Start" /t REG_DWORD /d 4 /f > nul
  540. echo [OK]
  541.  
  542. echo | set /p=Disable Windows Error Reporting
  543. reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d 1 /f > nul
  544. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d 1 /f > nul
  545. echo [OK]
  546.  
  547. echo | set /p=Disable Windows Tips
  548. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableSoftLanding" /t REG_DWORD /d 1 /f > nul
  549. echo [OK]
  550.  
  551. echo | set /p=Disable Windows Consumer Features (App Suggestions on Start)
  552. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d 0 /f > nul
  553. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 1 /f > nul
  554. echo [OK]
  555.  
  556. echo | set /p=Disable "Get tips, tricks and suggestions as you use Windows"
  557. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 0 /f > nul
  558. echo [OK]
  559.  
  560. echo | set /p=Disable ads in File Explorer
  561. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowSyncProviderNotifications" /t REG_DWORD /d 0 /f > nul
  562. echo [OK]
  563.  
  564. if not defined LTSB (
  565.     echo | set /p=Disable ads on lock screen
  566.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "RotatingLockScreenOverlayEnabled" /t REG_DWORD /d 0 /f > nul
  567.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /v "LockImageFlags" /t REG_DWORD /d 0 /f > nul
  568.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /v "CreativeId" /t REG_SZ /d "" /f > nul
  569.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /v "PortraitAssetPath" /t REG_SZ /d "" /f > nul
  570.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /v "LandscapeAssetPath" /t REG_SZ /d "" /f > nul
  571.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /v "DescriptionText" /t REG_SZ /d "" /f > nul
  572.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /v "ActionText" /t REG_SZ /d "" /f > nul
  573.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /v "ActionUri" /t REG_SZ /d "" /f > nul
  574.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /v "PlacementId" /t REG_SZ /d "" /f > nul
  575.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /v "ClickthroughToken" /t REG_SZ /d "" /f > nul
  576.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /v "ImpressionToken" /t REG_SZ /d "" /f > nul
  577.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /v "HotspotImageFolderPath" /t REG_SZ /d "" /f > nul
  578.     reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative" /v "CreativeJson" /t REG_SZ /d "" /f > nul
  579.     echo [OK]
  580. )
  581.  
  582. echo | set /p=Disable Windows Spotlight
  583. reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "ConfigureWindowsSpotlight" /t REG_DWORD /d 2 /f > nul
  584. reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableThirdPartySuggestions" /t REG_DWORD /d 1 /f > nul
  585. reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsSpotlightFeatures" /t REG_DWORD /d 1 /f > nul
  586. reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsSpotlightOnActionCenter" /t REG_DWORD /d 1 /f > nul
  587. reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsSpotlightWindowsWelcomeExperience" /t REG_DWORD /d 1 /f > nul
  588. echo [OK]
  589.  
  590. echo | set /p=Disable File History
  591. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\FileHistory" /v "Disabled" /t REG_DWORD /d 1 /f > nul
  592. echo [OK]
  593.  
  594. echo | set /p=Disable Active Help
  595. reg add "HKLM\SOFTWARE\Policies\Microsoft\Assistance\Client\1.0" /v "NoActiveHelp" /t REG_DWORD /d 1 /f > nul
  596. echo [OK]
  597.  
  598. echo | set /p=Disable loggers
  599. reg add "HKLM\SYSTEM\ControlSet001\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener" /v "Start" /t REG_DWORD /d 0 /f > nul
  600. reg add "HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener" /v "Start" /t REG_DWORD /d 0 /f > nul
  601. reg add "HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\SQMLogger" /v "Start" /t REG_DWORD /d 0 /f > nul
  602. echo [OK]
  603.  
  604. echo | set /p=Disable Windows Feedback
  605. reg add "HKCU\SOFTWARE\Microsoft\Siuf\Rules" /v "NumberOfSIUFInPeriod" /t REG_DWORD /d 0 /f > nul
  606. reg add "HKCU\SOFTWARE\Microsoft\Siuf\Rules" /v "PeriodInNanoSeconds" /t REG_DWORD /d 0 /f > nul
  607. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "DoNotShowFeedbackNotifications" /t REG_DWORD /d 1 /f > nul
  608. echo [OK]
  609.  
  610. echo | set /p=Disable Microsoft Help feedback
  611. reg add "HKCU\SOFTWARE\Policies\Microsoft\Assistance\Client\1.0" /v "NoExplicitFeedback" /t REG_DWORD /d 1 /f > nul
  612. echo [OK]
  613.  
  614. echo | set /p=Disable feedback on write
  615. reg add "HKLM\SOFTWARE\Microsoft\Input\TIPC" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  616. reg add "HKCU\SOFTWARE\Microsoft\Input\TIPC" /v "Enabled" /t REG_DWORD /d 0 /f > nul
  617. echo [OK]
  618.  
  619. echo | set /p=Disable lock screen camera
  620. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization" /v "NoLockScreenCamera" /t REG_DWORD /d 1 /f > nul
  621. echo [OK]
  622.  
  623. echo | set /p=Disable password reveal button
  624. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CredUI" /v "DisablePasswordReveal" /t REG_DWORD /d 1 /f > nul
  625. echo [OK]
  626.  
  627. echo | set /p=Disable Windows Insider Program
  628. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "AllowBuildPreview" /t REG_DWORD /d 0 /f > nul
  629. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" /v "EnableConfigFlighting" /t REG_DWORD /d 0 /f > nul
  630. echo [OK]
  631.  
  632. echo | set /p=Disable DRM features
  633. reg add "HKLM\SOFTWARE\Policies\Microsoft\WMDRM" /v "DisableOnline" /t REG_DWORD /d 1 /f > nul
  634. echo [OK]
  635.  
  636. echo | set /p=Disable Office 2016 telemetry
  637. reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\16.0\osm" /v "Enablelogging" /t REG_DWORD /d 0 /f > nul
  638. reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\16.0\osm" /v "EnableUpload" /t REG_DWORD /d 0 /f > nul
  639. echo [OK]
  640.  
  641. if not defined LTSB (
  642.     echo | set /p=Disable Adobe Flash Player in Microsoft Edge
  643.     reg add "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Addons" /v "FlashPlayerEnabled" /t REG_DWORD /d 0 /f > nul
  644.     echo [OK]
  645. )
  646.  
  647. echo | set /p=Disable Game Bar Tips
  648. reg add "HKCU\Software\Microsoft\GameBar" /v "ShowStartupPanel" /t REG_DWORD /d 0 /f > nul
  649. echo [OK]
  650.  
  651. echo | set /p=Disable Game DVR
  652. reg add "HKCU\System\GameConfigStore" /v "GameDVR_Enabled" /t REG_DWORD /d 0 /f > nul
  653. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\GameDVR" /v "AllowGameDVR" /t REG_DWORD /d 0 /f > nul
  654. echo [OK]
  655.  
  656. echo | set /p=Disable Live Tiles
  657. reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" /v "NoTileApplicationNotification" /t REG_DWORD /d 1 /f > nul
  658. echo [OK]
  659.  
  660. echo | set /p=Disable AutoPlay and AutoRun
  661. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f > nul
  662. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoAutorun" /t REG_DWORD /d 1 /f > nul
  663. echo [OK]
  664.  
  665. echo | set /p=Disable Remote Assistance
  666. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Remote Assistance" /v "fAllowToGetHelp" /t REG_DWORD /d 0 /f > nul
  667. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Remote Assistance" /v "fAllowFullControl" /t REG_DWORD /d 0 /f > nul
  668. echo [OK]
  669.  
  670. echo | set /p=Disable administrative shares
  671. reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v "AutoShareWks" /t REG_DWORD /d 0 /f > nul
  672. echo [OK]
  673.  
  674. echo | set /p=Do not track app launches
  675. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackProgs" /t REG_DWORD /d 0 /f > nul
  676. echo [OK]
  677.  
  678. echo | set /p=Do not send Windows Media Player statistics
  679. reg add "HKCU\SOFTWARE\Microsoft\MediaPlayer\Preferences" /v "UsageTracking" /t REG_DWORD /d 0 /f > nul
  680. echo [OK]
  681.  
  682. echo | set /p=Remove 3D Builder from context menu
  683. reg delete "HKEY_CLASSES_ROOT\SystemFileAssociations\.bmp\Shell\T3D Print" /f > nul 2>&1
  684. reg delete "HKEY_CLASSES_ROOT\SystemFileAssociations\.jpg\Shell\T3D Print" /f > nul 2>&1
  685. reg delete "HKEY_CLASSES_ROOT\SystemFileAssociations\.png\Shell\T3D Print" /f > nul 2>&1
  686. echo [OK]
  687.  
  688. echo | set /p=Set default PhotoViewer
  689. reg add "HKCU\SOFTWARE\Classes\.ico" /ve /t REG_SZ /d "PhotoViewer.FileAssoc.Tiff" /f > nul
  690. reg add "HKCU\SOFTWARE\Classes\.tiff" /ve /t REG_SZ /d "PhotoViewer.FileAssoc.Tiff" /f > nul
  691. reg add "HKCU\SOFTWARE\Classes\.bmp" /ve /t REG_SZ /d "PhotoViewer.FileAssoc.Tiff" /f > nul
  692. reg add "HKCU\SOFTWARE\Classes\.png" /ve /t REG_SZ /d "PhotoViewer.FileAssoc.Tiff" /f > nul
  693. reg add "HKCU\SOFTWARE\Classes\.gif" /ve /t REG_SZ /d "PhotoViewer.FileAssoc.Tiff" /f > nul
  694. reg add "HKCU\SOFTWARE\Classes\.jpeg" /ve /t REG_SZ /d "PhotoViewer.FileAssoc.Tiff" /f > nul
  695. reg add "HKCU\SOFTWARE\Classes\.jpg" /ve /t REG_SZ /d "PhotoViewer.FileAssoc.Tiff" /f > nul
  696. echo [OK]
  697.  
  698. echo | set /p=Turn off "You have new apps that can open this type of file" alert
  699. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoNewAppAlert" /t REG_DWORD /d 1 /f > nul
  700. echo [OK]
  701.  
  702. if not defined LTSB (
  703.     echo | set /p=Turn off "Look For An App In The Store" option
  704.     reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoUseStoreOpenWith" /t REG_DWORD /d 1 /f > nul
  705.     echo [OK]
  706. )
  707.  
  708. echo | set /p=Open File Explorer to This PC instead of Quick Access
  709. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "LaunchTo" /t REG_DWORD /d 1 /f > nul
  710. echo [OK]
  711.  
  712. echo | set /p=Do not show recently used files in Quick Access
  713. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowRecent" /t REG_DWORD /d 0 /f > nul
  714. echo [OK]
  715.  
  716. echo | set /p=Do not show frequently used folders in Quick Access
  717. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowFrequent" /t REG_DWORD /d 0 /f > nul
  718. echo [OK]
  719.  
  720. echo | set /p=Show hidden files, folders and drives in File Explorer
  721. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Hidden" /t REG_DWORD /d 1 /f > nul
  722. echo [OK]
  723.  
  724. echo | set /p=Show file extensions in File Explorer
  725. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f > nul
  726. echo [OK]
  727.  
  728. echo | set /p=Launch folder windows in a separate process
  729. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "SeparateProcess" /t REG_DWORD /d 1 /f > nul
  730. echo [OK]
  731.  
  732. echo | set /p=Auto-end non responsive tasks
  733. reg add "HKCU\Control Panel\Desktop" /v "AutoEndTasks" /t REG_SZ /d "1" /f > nul
  734. echo [OK]
  735.  
  736. echo | set /p=Maximize wallpaper quality
  737. reg add "HKCU\Control Panel\Desktop" /v "JPEGImportQuality" /t REG_DWORD /d 100 /f > nul
  738. echo [OK]
  739.  
  740. echo | set /p=Set icon cache size to 4096 KB
  741. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v "Max Cached Icons" /t REG_SZ /d "4096" /f > nul
  742. echo [OK]
  743.  
  744. echo | set /p=Add Recycle Bin to Navigation Pane
  745. reg add "HKCU\SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d 1 /f > nul
  746. echo [OK]
  747.  
  748. echo | set /p=Restore Classic Context Menu in Explorer
  749. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\FlightedFeatures" /v "ImmersiveContextMenu" /t REG_DWORD /d 0 /f > nul
  750. echo [OK]
  751.  
  752. echo | set /p=Set "Do this for all current items" checkbox by default in the file operation conflict dialog
  753. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" /v "ConfirmationCheckBoxDoForAll" /t REG_DWORD /d 1 /f > nul
  754. echo [OK]
  755.  
  756. echo | set /p=Enable NTFS long paths
  757. reg add "HKLM\SYSTEM\CurrentControlSet\Policies" /v "LongPathsEnabled" /t REG_DWORD /d 1 /f > nul
  758. echo [OK]
  759.  
  760. echo.
  761. echo | set /p=Restarting Explorer...
  762. taskkill /f /im explorer.exe >nul & explorer.exe
  763. schtasks /delete /tn "CreateExplorerShellUnelevatedTask" /f > nul
  764. echo OK.
  765.  
  766. echo.
  767. echo Deleting spyware tasks...
  768. set spy_tasks=^
  769.     "Microsoft\Office\Office 15 Subscription Heartbeat"^
  770.     "Microsoft\Office\OfficeTelemetryAgentFallBack2016"^
  771.     "Microsoft\Office\OfficeTelemetryAgentLogOn2016"^
  772.     "Microsoft\Windows\AppID\SmartScreenSpecific"^
  773.     "Microsoft\Windows\Application Experience\AitAgent"^
  774.     "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser"^
  775.     "Microsoft\Windows\Application Experience\ProgramDataUpdater"^
  776.     "Microsoft\Windows\Application Experience\StartupAppTask"^
  777.     "Microsoft\Windows\Autochk\Proxy"^
  778.     "Microsoft\Windows\Clip\License Validation"^
  779.     "Microsoft\Windows\CloudExperienceHost\CreateObjectTask"^
  780.     "Microsoft\Windows\Customer Experience Improvement Program\BthSQM"^
  781.     "Microsoft\Windows\Customer Experience Improvement Program\Consolidator"^
  782.     "Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask"^
  783.     "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip"^
  784.     "Microsoft\Windows\Device Information\Device"^
  785.     "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector"^
  786.     "Microsoft\Windows\Feedback\Siuf\DmClient"^
  787.     "Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload"^
  788.     "Microsoft\Windows\License Manager\TempSignedLicenseExchange"^
  789.     "Microsoft\Windows\Location\Notifications"^
  790.     "Microsoft\Windows\Location\WindowsActionDialog"^
  791.     "Microsoft\Windows\Maps\MapsToastTask"^
  792.     "Microsoft\Windows\Maps\MapsUpdateTask"^
  793.     "Microsoft\Windows\Media Center\ActivateWindowsSearch"^
  794.     "Microsoft\Windows\Media Center\ConfigureInternetTimeService"^
  795.     "Microsoft\Windows\Media Center\DispatchRecoveryTasks"^
  796.     "Microsoft\Windows\Media Center\ehDRMInit"^
  797.     "Microsoft\Windows\Media Center\InstallPlayReady"^
  798.     "Microsoft\Windows\Media Center\mcupdate"^
  799.     "Microsoft\Windows\Media Center\MediaCenterRecoveryTask"^
  800.     "Microsoft\Windows\Media Center\ObjectStoreRecoveryTask"^
  801.     "Microsoft\Windows\Media Center\OCURActivate"^
  802.     "Microsoft\Windows\Media Center\OCURDiscovery"^
  803.     "Microsoft\Windows\Media Center\PBDADiscovery"^
  804.     "Microsoft\Windows\Media Center\PBDADiscoveryW1"^
  805.     "Microsoft\Windows\Media Center\PBDADiscoveryW2"^
  806.     "Microsoft\Windows\Media Center\PvrRecoveryTask"^
  807.     "Microsoft\Windows\Media Center\PvrScheduleTask"^
  808.     "Microsoft\Windows\Media Center\RegisterSearch"^
  809.     "Microsoft\Windows\Media Center\ReindexSearchRoot"^
  810.     "Microsoft\Windows\Media Center\SqlLiteRecoveryTask"^
  811.     "Microsoft\Windows\Media Center\UpdateRecordPath"^
  812.     "Microsoft\Windows\Maintenance\WinSAT"^
  813.     "Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem"^
  814.     "Microsoft\Windows\RetailDemo\CleanupOfflineContent"^
  815.     "Microsoft\Windows\SettingSync\BackgroundUploadTask"^
  816.     "Microsoft\Windows\SettingSync\BackupTask"^
  817.     "Microsoft\Windows\SettingSync\NetworkStateChangeTask"^
  818.     "Microsoft\Windows\Shell\FamilySafetyMonitor"^
  819.     "Microsoft\Windows\Shell\FamilySafetyMonitorToastTask"^
  820.     "Microsoft\Windows\Shell\FamilySafetyRefresh"^
  821.     "Microsoft\Windows\Shell\FamilySafetyRefreshTask"^
  822.     "Microsoft\Windows\Speech\SpeechModelDownloadTask"^
  823.     "Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance"^
  824.     "Microsoft\Windows\Windows Defender\Windows Defender Cleanup"^
  825.     "Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan"^
  826.     "Microsoft\Windows\Windows Defender\Windows Defender Verification"^
  827.     "Microsoft\Windows\Windows Error Reporting\QueueReporting"^
  828.     "Microsoft\Windows\WindowsUpdate\Automatic App Update"^
  829.     "Microsoft\Windows\WindowsUpdate\sih"^
  830.     "Microsoft\Windows\WindowsUpdate\sihboot"^
  831.     "Microsoft\Windows\WS\License Validation"^
  832.     "Microsoft\Windows\WS\WSTask"^
  833.     "Microsoft\XblGameSave\XblGameSaveTask"^
  834.     "Microsoft\XblGameSave\XblGameSaveTaskLogon"
  835. set tasks_dir=%SystemRoot%\System32\Tasks
  836. for %%i in (%spy_tasks%) do (
  837.     schtasks /query /tn %%i > nul 2>&1
  838.     if not errorlevel 1 (
  839.         echo | set /p=%%i
  840.         schtasks /delete /tn %%i /f > nul
  841.         set item=%%i
  842.         set dir_path="%tasks_dir%\!item:~1!
  843.         mkdir !dir_path!
  844.         if defined eng (
  845.             icacls !dir_path! /deny "Everyone:(OI)(CI)W" > nul
  846.         )
  847.         set spy_task_deleted=1
  848.         echo  [OK]
  849.     )
  850. )
  851. if not defined spy_task_deleted (
  852.     echo Spyware tasks already deleted.
  853. )
  854.  
  855. set update_orchestrator_dir=%tasks_dir%\Microsoft\Windows\UpdateOrchestrator
  856. if not exist %update_orchestrator_dir%\Reboot\ (
  857.     echo.
  858.     echo | set /p=Prevent Windows 10 reboots after installing updates...
  859.     schtasks /delete /tn "Microsoft\Windows\UpdateOrchestrator\Reboot" /f > nul 2>&1
  860.     mkdir %update_orchestrator_dir%\Reboot
  861.     if defined eng (
  862.         icacls %update_orchestrator_dir%\Reboot /deny "Everyone:(OI)(CI)W" > nul
  863.     )
  864.     echo OK.
  865. )
  866.  
  867. echo.
  868. echo Finished.
  869. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement