Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal EnableDelayedExpansion
- ver | find "10." > nul
- if errorlevel 1 (
- echo Your Windows version is not Windows 10... yet. Brace yourself, Windows 10 is coming^^!
- pause
- exit
- )
- echo Make Windows 10 Great Again^^! Batch spyware and trash remover, v. 1.0.3 beta
- echo Optimized for October 2018 Update.
- pause
- echo.
- echo | set /p=Checking permissions...
- net session >nul 2>&1
- if errorlevel 1 (
- echo Permission denied. Run this script as administrator.
- pause
- exit
- ) else (
- echo OK.
- timeout /t 1 > nul
- )
- reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v "ProductName" | findstr "LTSC LTSB" > nul
- if not errorlevel 1 (
- set LTSC=1
- )
- whoami /groups | find "Everyone" > nul
- if not errorlevel 1 (
- set eng=1
- )
- if not defined LTSC (
- cls
- echo Deleting trash apps...
- powershell -Command "& {Get-AppxPackage -AllUsers *officehub* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *powerbi* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *oneconnect* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *solitaire* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *photoshopexpress* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *eclipsemanager* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *pandora* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *duolingo* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *candycrush* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *zunevideo* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *zunemusic* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *photos* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *gethelp* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *getstarted* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *windowsmaps* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *messaging* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *print3d* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *3dviewer* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *stickynotes* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *xbox* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *asphalt8* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *hiddencity* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *onenote* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *freshpaint* | Remove-AppxPackage;}"
- powershell -Command "& {Get-AppxPackage -AllUsers *feedbackhub* | Remove-AppxPackage;}"
- )
- cls
- echo Deleting spyware firewall rules...
- powershell -Command "& {Get-NetFirewallRule | Where { $_.Group -eq 'DiagTrack' } | Remove-NetFirewallRule;}"
- powershell -Command "& {Get-NetFirewallRule | Where { $_.DisplayGroup -eq 'Delivery Optimization' } | Remove-NetFirewallRule;}"
- cls
- echo | set /p=Deleting OneDrive...
- taskkill /f /im OneDrive.exe > nul 2>&1
- if exist %SystemRoot%\System32\OneDriveSetup.exe (
- start /wait %SystemRoot%\System32\OneDriveSetup.exe /uninstall
- ) else if exist %SystemRoot%\SysWOW64\OneDriveSetup.exe (
- start /wait %SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall
- )
- rd "%UserProfile%\OneDrive" /q /s > nul 2>&1
- rd "%SystemDrive%\OneDriveTemp" /q /s > nul 2>&1
- rd "%LocalAppData%\Microsoft\OneDrive" /q /s > nul 2>&1
- rd "%ProgramData%\Microsoft OneDrive" /q /s > nul 2>&1
- reg delete "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > nul 2>&1
- reg delete "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > nul 2>&1
- reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDrive" /f > nul 2>&1
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSyncNGSC" /t REG_DWORD /d 1 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSync" /t REG_DWORD /d 1 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v "DisableLibrariesDefaultSaveToOneDrive" /t REG_DWORD /d 1 /f > nul
- reg add "HKCU\SOFTWARE\Microsoft\OneDrive" /v "DisablePersonalSync" /t REG_DWORD /d 1 /f > nul
- echo OK.
- echo.
- echo Disabling spyware/unsafe services...
- set unsafe_services=^
- DiagTrack,dmwappushservice,diagnosticshub.standardcollector.service,^
- WerSvc,PcaSvc,DoSvc
- for %%i in (%unsafe_services%) do (
- echo Current service: %%i
- sc stop %%i > nul
- sc config %%i start= disabled
- )
- echo.
- echo Adding antispy firewall rules...
- set spy_apps=^
- "Program Files\Microsoft Office\Office16\msoia.exe"^
- "Program Files\Microsoft Office\root\Office16\msoia.exe"^
- "Program Files (x86)\Microsoft Office\Office16\msoia.exe"^
- "Program Files (x86)\Microsoft Office\root\Office16\msoia.exe"^
- "Windows\System32\CompatTelRunner.exe"^
- "Windows\System32\dmclient.exe"^
- "Windows\System32\rundll32.exe"^
- "Windows\System32\SIHClient.exe"^
- "Windows\System32\smartscreen.exe"^
- "Windows\System32\taskhostw.exe"^
- "Windows\System32\wbem\WmiPrvSE.exe"^
- "Windows\System32\WerFault.exe"^
- "Windows\System32\wermgr.exe"^
- "Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\SearchUI.exe"^
- "Windows\SysWOW64\rundll32.exe"^
- "Windows\SysWOW64\wbem\WmiPrvSE.exe"^
- "Windows\SysWOW64\WerFault.exe"^
- "Windows\SysWOW64\wermgr.exe"
- for %%i in (%spy_apps%) do (
- set item=%%i
- set file_path="%SystemDrive%\!item:~1!
- if exist !file_path! (
- echo !file_path! | find "SysWOW64" > nul
- if errorlevel 1 (
- set rule_name=%%~nxi_BLOCK
- ) else (
- set rule_name=%%~nxi-SysWOW64_BLOCK
- )
- netsh advfirewall firewall show rule !rule_name! > nul
- if errorlevel 1 (
- echo | set /p=!rule_name!
- netsh advfirewall firewall add rule name=!rule_name! dir=out interface=any action=block program=!file_path! > nul
- set frw_rule_added=1
- echo [OK]
- )
- )
- )
- set spy_svc=WSearch
- netsh advfirewall firewall show rule %spy_svc%_BLOCK > nul
- if errorlevel 1 (
- echo | set /p=%spy_svc%_BLOCK
- netsh advfirewall firewall add rule name="%spy_svc%_BLOCK" dir=out interface=any action=block service=%spy_svc% > nul
- set frw_rule_added=1
- echo [OK]
- )
- if not defined frw_rule_added (
- echo Antispy rules already present.
- )
- echo.
- echo Blocking spyware domains...
- set spy_domains=^
- nullroute,^
- v10.vortex-win.data.microsoft.com,watson.telemetry.microsoft.com,^
- settings-win.data.microsoft.com,ris.api.iris.microsoft.com,^
- ars.smartscreen.microsoft.com,www.msftconnecttest.com,^
- www.bing.com,c.bing.com,g.bing.com,appex.bing.com,^
- statsfe1.ws.microsoft.com,statsfe2.ws.microsoft.com,^
- statsfe1-df.ws.microsoft.com,statsfe2-df.ws.microsoft.com,^
- ocos-office365-s2s.msedge.net,client-office365-tas.msedge.net,^
- config.edge.skype.com,insights.notes.microsoft.com,^
- iceprime_msnapp-iceprime-c2s.msedge.net,g.msn.com,^
- nexus.officeapps.live.com,nexusrules.officeapps.live.com,^
- cs.dds.microsoft.com,mobile.pipe.aria.microsoft.com
- set hosts=%SystemRoot%\System32\drivers\etc\hosts
- for %%i in (%spy_domains%) do (
- find /c " %%i" %hosts% > nul
- if errorlevel 1 (
- echo %%i
- echo 0.0.0.0 %%i>>%hosts%
- set hosts_added=1
- )
- )
- if not defined hosts_added (
- echo Spyware domains already blocked.
- ) else (
- echo.
- echo | set /p=Flushing DNS cache
- ipconfig /flushdns > nul
- echo [OK]
- )
- echo.
- echo Adding registry tweaks...
- echo | set /p=Disable telemetry
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f > nul
- echo [OK]
- echo | set /p=Disable Windows Customer Experience Improvement Program
- reg add "HKLM\SOFTWARE\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\SQMClient" /v "CorporateSQMURL" /t REG_SZ /d "0.0.0.0" /f > nul
- echo [OK]
- echo | set /p=Disable Application Telemetry
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "AITEnable" /t REG_DWORD /d 0 /f > nul
- echo [OK]
- echo | set /p=Disable Advertising ID
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v "Enabled" /t REG_DWORD /d 0 /f > nul
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v "Enabled" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" /v "DisabledByGroupPolicy" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Disable keylogger
- reg add "HKCU\SOFTWARE\Microsoft\InputPersonalization" /v "RestrictImplicitInkCollection" /t REG_DWORD /d 1 /f > nul
- reg add "HKCU\SOFTWARE\Microsoft\InputPersonalization" /v "RestrictImplicitTextCollection" /t REG_DWORD /d 1 /f > nul
- reg add "HKCU\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" /v "HarvestContacts" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\TabletPC" /v "PreventHandwritingDataSharing" /t REG_DWORD /d 1 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\HandwritingErrorReports" /v "PreventHandwritingErrorReports" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Disable browser access to local language
- reg add "HKCU\Control Panel\International\User Profile" /v "HttpAcceptLanguageOptOut" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Disable SmartScreen
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v "SmartScreenEnabled" /t REG_SZ /d "Off" /f > nul
- reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer" /v "SmartScreenEnabled" /t REG_SZ /d "Off" /f > nul
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" /v "EnableWebContentEvaluation" /t REG_DWORD /d 0 /f > nul
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" /v "EnableWebContentEvaluation" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "EnableSmartScreen" /t REG_DWORD /d 0 /f > nul
- echo [OK]
- echo | set /p=Disable Cortana and web search
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowCortana" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowSearchToUseLocation" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "ConnectedSearchPrivacy" /t REG_DWORD /d 3 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "ConnectedSearchUseWeb" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "DisableWebSearch" /t REG_DWORD /d 1 /f > nul
- reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Experience\AllowCortana" /v "value" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CortanaEnabled" /t REG_DWORD /d 0 /f > nul
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "BingSearchEnabled" /t REG_DWORD /d 0 /f > nul
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CortanaEnabled" /t REG_DWORD /d 0 /f > nul
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "CanCortanaBeEnabled" /t REG_DWORD /d 0 /f > nul
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "DeviceHistoryEnabled" /t REG_DWORD /d 0 /f > nul
- echo [OK]
- echo | set /p=Disable Windows Defender
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /t REG_DWORD /d 1 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableBehaviorMonitoring" /t REG_DWORD /d 1 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableOnAccessProtection" /t REG_DWORD /d 1 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableScanOnRealtimeEnable" /t REG_DWORD /d 1 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "SpyNetReporting" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "SubmitSamplesConsent" /t REG_DWORD /d 2 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Systray" /v "HideSystray" /t REG_DWORD /d 1 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\MRT" /v "DontOfferThroughWUAU" /t REG_DWORD /d 1 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\MRT" /v "DontReportInfectionInformation" /t REG_DWORD /d 1 /f > nul
- regsvr32 /s /u "%ProgramFiles%\Windows Defender\shellext.dll"
- taskkill /f /im MSASCuiL.exe > nul 2>&1
- reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "WindowsDefender" /f > nul 2>&1
- reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "SecurityHealth" /f > nul 2>&1
- echo [OK]
- echo | set /p=Disable Delivery Optimization
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization" /v "SystemSettingsDownloadMode" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v "DODownloadMode" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" /v "DODownloadMode" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" /v "SystemSettingsDownloadMode" /t REG_DWORD /d 0 /f > nul
- echo [OK]
- echo | set /p=Disable Program Compatibility Assistant
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "DisablePCA" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Disable Windows Error Reporting
- reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d 1 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Disable Windows Tips
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableSoftLanding" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Disable Windows Consumer Features (App Suggestions on Start)
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Disable "Get tips, tricks and suggestions as you use Windows"
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 0 /f > nul
- echo [OK]
- echo | set /p=Disable ads in File Explorer
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowSyncProviderNotifications" /t REG_DWORD /d 0 /f > nul
- echo [OK]
- echo | set /p=Disable People Bar
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" /v "PeopleBand" /t REG_DWORD /d 0 /f > nul
- echo [OK]
- echo | set /p=Disable loggers
- reg add "HKLM\SYSTEM\ControlSet001\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener" /v "Start" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener" /v "Start" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\SQMLogger" /v "Start" /t REG_DWORD /d 0 /f > nul
- echo [OK]
- echo | set /p=Disable Windows Feedback
- reg add "HKCU\SOFTWARE\Microsoft\Siuf\Rules" /v "NumberOfSIUFInPeriod" /t REG_DWORD /d 0 /f > nul
- reg add "HKCU\SOFTWARE\Microsoft\Siuf\Rules" /v "PeriodInNanoSeconds" /t REG_DWORD /d 0 /f > nul
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "DoNotShowFeedbackNotifications" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Disable Microsoft Help feedback
- reg add "HKCU\SOFTWARE\Policies\Microsoft\Assistance\Client\1.0" /v "NoExplicitFeedback" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Disable feedback on write
- reg add "HKLM\SOFTWARE\Microsoft\Input\TIPC" /v "Enabled" /t REG_DWORD /d 0 /f > nul
- reg add "HKCU\SOFTWARE\Microsoft\Input\TIPC" /v "Enabled" /t REG_DWORD /d 0 /f > nul
- echo [OK]
- echo | set /p=Disable Office 2016 telemetry
- reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\16.0\osm" /v "Enablelogging" /t REG_DWORD /d 0 /f > nul
- reg add "HKCU\SOFTWARE\Policies\Microsoft\Office\16.0\osm" /v "EnableUpload" /t REG_DWORD /d 0 /f > nul
- echo [OK]
- echo | set /p=Disable Office 2016 OneDrive Integration
- reg add "HKCU\SOFTWARE\Policies\Microsoft\office\16.0\Common\SignIn" /v "SignInOptions" /t REG_DWORD /d "3" /f > nul
- reg add "HKCU\SOFTWARE\Policies\Microsoft\office\Common\WebIntegration" /v "WebIntegrationEnabled" /t REG_DWORD /d "0" /f > nul
- echo [OK]
- echo | set /p=Turn off "You have new apps that can open this type of file" alert
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoNewAppAlert" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Open File Explorer to This PC instead of Quick Access
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "LaunchTo" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Show hidden files, folders and drives in File Explorer
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Hidden" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Show file extensions in File Explorer
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f > nul
- echo [OK]
- echo | set /p=Launch folder windows in a separate process
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "SeparateProcess" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Auto-end non responsive tasks
- reg add "HKCU\Control Panel\Desktop" /v "AutoEndTasks" /t REG_SZ /d "1" /f > nul
- echo [OK]
- echo | set /p=Maximize wallpaper quality
- reg add "HKCU\Control Panel\Desktop" /v "JPEGImportQuality" /t REG_DWORD /d 100 /f > nul
- echo [OK]
- echo | set /p=Set icon cache size to 4096 KB
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v "Max Cached Icons" /t REG_SZ /d "4096" /f > nul
- echo [OK]
- echo | set /p=Remove 3D Objects from This PC
- reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" /f > nul 2>&1
- reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" /f > nul 2>&1
- echo [OK]
- echo | set /p=Add Recycle Bin to Navigation Pane
- reg add "HKCU\SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Set "Do this for all current items" checkbox by default in the file operation conflict dialog
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" /v "ConfirmationCheckBoxDoForAll" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo | set /p=Enable NTFS long paths
- reg add "HKLM\SYSTEM\CurrentControlSet\Policies" /v "LongPathsEnabled" /t REG_DWORD /d 1 /f > nul
- echo [OK]
- echo.
- echo | set /p=Restarting Explorer...
- taskkill /f /im explorer.exe >nul & explorer.exe
- schtasks /delete /tn "CreateExplorerShellUnelevatedTask" /f > nul
- echo OK.
- echo.
- echo Deleting spyware tasks...
- set spy_tasks=^
- "Microsoft\Office\OfficeTelemetryAgentFallBack2016"^
- "Microsoft\Office\OfficeTelemetryAgentLogOn2016"^
- "Microsoft\Windows\AppID\SmartScreenSpecific"^
- "Microsoft\Windows\Application Experience\AitAgent"^
- "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser"^
- "Microsoft\Windows\Application Experience\ProgramDataUpdater"^
- "Microsoft\Windows\Autochk\Proxy"^
- "Microsoft\Windows\Customer Experience Improvement Program\BthSQM"^
- "Microsoft\Windows\Customer Experience Improvement Program\Consolidator"^
- "Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask"^
- "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip"^
- "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector"^
- "Microsoft\Windows\Feedback\Siuf\DmClient"^
- "Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload"^
- "Microsoft\Windows\Windows Error Reporting\QueueReporting"^
- "Microsoft\Windows\WindowsUpdate\sih"^
- "Microsoft\Windows\WindowsUpdate\sihboot"
- set tasks_dir=%SystemRoot%\System32\Tasks
- for %%i in (%spy_tasks%) do (
- schtasks /query /tn %%i > nul 2>&1
- if not errorlevel 1 (
- echo | set /p=%%i
- schtasks /delete /tn %%i /f > nul
- set item=%%i
- set dir_path="%tasks_dir%\!item:~1!
- mkdir !dir_path!
- if defined eng (
- icacls !dir_path! /deny "Everyone:(OI)(CI)W" > nul
- )
- set spy_task_deleted=1
- echo [OK]
- )
- )
- if not defined spy_task_deleted (
- echo Spyware tasks already deleted.
- )
- set update_orchestrator_dir=%tasks_dir%\Microsoft\Windows\UpdateOrchestrator
- if not exist %update_orchestrator_dir%\Reboot\ (
- echo.
- echo | set /p=Prevent Windows 10 reboots after installing updates...
- schtasks /delete /tn "Microsoft\Windows\UpdateOrchestrator\Reboot" /f > nul 2>&1
- del %update_orchestrator_dir%\Reboot
- mkdir %update_orchestrator_dir%\Reboot
- if defined eng (
- icacls %update_orchestrator_dir%\Reboot /deny "Everyone:(OI)(CI)W" > nul
- )
- echo OK.
- )
- echo.
- echo Finished.
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement