Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off& title Windows 10 Bloat Subscribe Toggle
- :: AveYo: added complete SubscribedContent reference
- call :check_status
- echo(
- echo ---------------------------------------------------------------------
- echo : Windows 10 Bloat Subscribe Toggle v2019.10.28 :
- echo :---------------------------------------------------------------------:
- echo : Only a prevention, won't uninstall existing items for your account :
- echo : But new users get a clean LTSC-like menu with no 3rd party items. :
- echo : Usually prevents bloat being reinstalled after upgrades :
- echo : Run this script again to subscribe on/off :
- echo : :
- echo : Before: %STATUS%%__% :
- echo : :
- echo : Press Alt+F4 to cancel Always run latest version :
- echo ---------------------------------------------------------------------
- echo RED = unsubscribed
- timeout /t 3 >nul
- :: ask for elevation passing args and preventing loop
- set "args="%~f0" %*"& reg query HKU\S-1-5-19>nul 2>nul || if "%_%" neq "y" (
- powershell -c "$Env:_='y';$ErrorActionPreference=0;start cmd -Arg \"/c call $Env:args\" -verb runas"& exit)
- :: Main
- set "OP=add"& set "DEL="& set "D0=0x0"& set "D1=0x1"
- if "%STATUS%"=="UNSUBSCRIBED" set "OP=delete"& set "DEL=&rem"& set "D0=0x0"& set "D1=0x1"
- :: HKCU entries will also be propagated to new users:
- reg load HKU\NewUsers "C:\Users\Default\NTUSER.DAT" >nul && set "NewUsers=HKU\NewUsers" || set "NewUsers="
- :: Manage Content Delivery (SubscribedContent) Bloat
- set "cdm=Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
- for %%u in (HKCU %NewUsers%) do (
- reg %OP% "%%u\%CDM%" /f /v FeatureManagementEnabled %DEL% /d 0 /t reg_dword %= Feature Management generic =%
- reg %OP% "%%u\%CDM%" /f /v ContentDeliveryAllowed %DEL% /d 0 /t reg_dword %= Content Delivery generic =%
- reg %OP% "%%u\%CDM%" /f /v OemPreInstalledAppsEnabled %DEL% /d 0 /t reg_dword %= OEM Preinstalled Apps =%
- reg %OP% "%%u\%CDM%" /f /v PreInstalledAppsEnabled %DEL% /d 0 /t reg_dword %= Preinstalled Apps =%
- reg %OP% "%%u\%CDM%" /f /v PreInstalledAppsEverEnabled %DEL% /d 0 /t reg_dword %= Preinstalled Apps flag =%
- reg %OP% "%%u\%CDM%" /f /v RotatingLockScreenEnabled %DEL% /d 0 /t reg_dword %= Lock Screen Ads =%
- reg %OP% "%%u\%CDM%" /f /v RotatingLockScreenOverlayEnabled %DEL% /d 0 /t reg_dword %= Lock Screen Tips =%
- reg %OP% "%%u\%CDM%" /f /v SilentInstalledAppsEnabled %DEL% /d 0 /t reg_dword %= Suggested Apps =%
- reg %OP% "%%u\%CDM%" /f /v SoftLandingEnabled %DEL% /d 0 /t reg_dword %= Tips about Windows =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContentEnabled %DEL% /d 0 /t reg_dword %= Suggested Apps generic =%
- reg %OP% "%%u\%CDM%" /f /v SystemPaneSuggestionsEnabled %DEL% /d 0 /t reg_dword %= Settings Suggestions =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-202913Enabled %DEL% /d 0 /t reg_dword %= SilentInstalledApps 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-202914Enabled %DEL% /d 0 /t reg_dword %= SilentInstalledApps 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-280797Enabled %DEL% /d 0 /t reg_dword %= SyncProviders 1 OneDriveLocal =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-280811Enabled %DEL% /d 0 /t reg_dword %= SyncProviders 2 OneDriveLocal =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-280812Enabled %DEL% /d 0 /t reg_dword %= ApiTest =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-280813Enabled %DEL% /d 0 /t reg_dword %= Windows Ink - StokedOnIt =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-280814Enabled %DEL% /d 0 /t reg_dword %= Share 1 Facebook Instagram =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-280815Enabled %DEL% /d 0 /t reg_dword %= Share 2 Facebook Instagram =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-280810Enabled %DEL% /d 0 /t reg_dword %= OneDriveSync 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-280817Enabled %DEL% /d 0 /t reg_dword %= OneDriveSync 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-310091Enabled %DEL% /d 0 /t reg_dword %= ActionCenter 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-310092Enabled %DEL% /d 0 /t reg_dword %= ActionCenter 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-310093Enabled %DEL% /d 0 /t reg_dword %= MinuteZeroOffers 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-310094Enabled %DEL% /d 0 /t reg_dword %= MinuteZeroOffers 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-314558Enabled %DEL% /d 0 /t reg_dword %= DynamicLayouts 1 Candy Crush =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-314559Enabled %DEL% /d 0 /t reg_dword %= DynamicLayouts 2 Candy Crush =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-314562Enabled %DEL% /d 0 /t reg_dword %= PeopleAppSuggestions 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-314563Enabled %DEL% /d 0 /t reg_dword %= PeopleAppSuggestions 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-314566Enabled %DEL% /d 0 /t reg_dword %= OobeOffers 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-314567Enabled %DEL% /d 0 /t reg_dword %= OobeOffers 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-338380Enabled %DEL% /d 0 /t reg_dword %= LockScreen 1 Hotspot =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-338387Enabled %DEL% /d 0 /t reg_dword %= LockScreen 2 Hotspot =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-338381Enabled %DEL% /d 0 /t reg_dword %= StartSuggestions 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-338388Enabled %DEL% /d 0 /t reg_dword %= StartSuggestions 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-338382Enabled %DEL% /d 0 /t reg_dword %= WindowsTip 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-338389Enabled %DEL% /d 0 /t reg_dword %= WindowsTip 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-338386Enabled %DEL% /d 0 /t reg_dword %= Settings 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-338393Enabled %DEL% /d 0 /t reg_dword %= Settings 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-346480Enabled %DEL% /d 0 /t reg_dword %= Signals 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-346481Enabled %DEL% /d 0 /t reg_dword %= Signals 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-353694Enabled %DEL% /d 0 /t reg_dword %= SettingsAccountsYourInfo 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-353695Enabled %DEL% /d 0 /t reg_dword %= SettingsAccountsYourInfo 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-353696Enabled %DEL% /d 0 /t reg_dword %= SettingsHome 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-353697Enabled %DEL% /d 0 /t reg_dword %= SettingsHome 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-353698Enabled %DEL% /d 0 /t reg_dword %= Timeline 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-353699Enabled %DEL% /d 0 /t reg_dword %= Timeline 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-88000044Enabled %DEL% /d 0 /t reg_dword %= AppDefaultsEdgeEnlightenment 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-88000045Enabled %DEL% /d 0 /t reg_dword %= AppDefaultsEdgeEnlightenment 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-88000105Enabled %DEL% /d 0 /t reg_dword %= SettingsValueBanner 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-88000106Enabled %DEL% /d 0 /t reg_dword %= SettingsValueBanner 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-88000161Enabled %DEL% /d 0 /t reg_dword %= OneDriveDocuments 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-88000162Enabled %DEL% /d 0 /t reg_dword %= OneDriveDocuments 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-88000163Enabled %DEL% /d 0 /t reg_dword %= OneDriveDesktop 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-88000164Enabled %DEL% /d 0 /t reg_dword %= OneDriveDesktop 2 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-88000165Enabled %DEL% /d 0 /t reg_dword %= OneDrivePictures 1 =%
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-88000166Enabled %DEL% /d 0 /t reg_dword %= OneDrivePictures 2 =%
- ) >nul 2>nul
- :: Discover other subscriptions and add them too
- for %%u in (HKCU %NewUsers%) do for /f %%s in ('reg query "HKCU\%CDM%\Subscriptions"') do (
- reg %OP% "%%u\%CDM%" /f /v SubscribedContent-%%~nxsEnabled %DEL% /d 0 /t reg_dword
- ) >nul 2>nul
- :: Discover suggested apps
- for %%u in (HKCU %NewUsers%) do for /f %%s in ('reg query "HKCU\%CDM%\SuggestedApps" 2^>nul ^|find "REG_D" 2^>nul') do (
- reg %OP% "%%u\%CDM%\SuggestedApps" /f /v %%s %DEL% /d 0 /t reg_dword
- ) >nul 2>nul
- :: Manage background run for ContentDelivery
- rem set "backgracc=Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications"
- rem for %%u in (HKCU %NewUsers%) do (
- rem reg %OP% "%%u\%backgracc%\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy" /f /v Disabled %DEL% /d 1 /t reg_dword
- rem ) >nul 2>nul
- :: Manage Windows Ink suggestions
- set "INK=Software\Microsoft\Windows\CurrentVersion\PenWorkspace"
- for %%u in (HKCU %NewUsers%) do (
- reg %OP% "%%u\%INK%" /f /v PenWorkspaceAppSuggestionsEnabled %DEL% /d 0 /t reg_dword
- ) >nul 2>nul
- :: Manage Sync Providers (OneDrive) notifications
- set "SYNC=Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
- for %%u in (HKCU %NewUsers%) do (
- reg %OP% "%%u\%SYNC%" /f /v ShowSyncProviderNotifications %DEL% /d 0 /t reg_dword
- ) >nul 2>nul
- :: Done!
- :: HKCU entries will also be propagated to new users:
- reg unload HKU\NewUsers >nul
- call :check_status
- echo(
- echo --------------------------
- echo After : %STATUS%
- echo --------------------------
- echo(
- pause
- exit/b
- :check_status
- set "bloatkey=HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
- for /f "tokens=2*" %%s in ('reg query "%bloatkey%" /v ContentDeliveryAllowed 2^>nul') do set "BLOAT_SUBSCRIBE=%%t"
- if "%BLOAT_SUBSCRIBE%"=="" (set "STATUS= DEFAULT "& color 0b) else set "STATUS=UNSUBSCRIBED"& color 0c
- set "__="& exit/b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement