Code:
@echo off
cd /d %~dp0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: This batch file will customize many settings within Windows following a clean install. For example, it will ::
:: turn off advertising that is displayed in a number of places within Windows. It will enable automatic hiding ::
:: of the taskbar, disable widgets, configure power settings, and much, much more. ::
:: ::
:: About the comments in this batch file: ::
:: ::
:: Throughout this batch file, in those places where an option can simply be turned on or off, you will note that ::
:: the setting is preseeded with a comment that says "Turn on" or "Turn off". There will also be another comment ::
:: prior to that that notes where in the GUI this group of settings can be found so that you can easily flip the ::
:: state from ON to OFF or from OFF to ON in the GUI, should you wish to do so. If a GUI setting for the option ::
:: does not exist, we will note how to alter the setting from a command line. ::
:: ::
:: For some settings, rather that a "Turn on" or or "Turn off", you will find that the comments say "Enable" or ::
:: "Disable". In these cases, the provided command line not only turns an an option on or off, but it enables or ::
:: disables the GUI option as well. Where possible, we discribe how to reverse this from the command line as well. ::
:: ::
:: There are many, many more settings that could be altered from a command line, but if you don't see a setting for ::
:: something that you wish to alter here, this means that either I could not find a command line option to alter ::
:: that setting or that I wanted to keep the default setting for that option. ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Check to see if this batch file is being run as Administrator. If it is not, then rerun the batch file ::
:: automatically as admin and terminate the intial instance of the batch file. ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
(Fsutil Dirty Query %SystemDrive%>Nul)||(PowerShell start """%~f0""" -verb RunAs & Exit /B) > NUL 2>&1
::::::::::::::::::::::::::::::::::::::::::::::::
:: End Routine to check if being run as Admin ::
::::::::::::::::::::::::::::::::::::::::::::::::
cls
echo ***********************************
echo * Applying Windows Customizations *
echo ***********************************
echo.
echo Please be patient since this process may take a while...
echo.
REM #########################
REM # Notification Settings #
REM #########################
REM ###########################################################
REM # The following settings can be found here: #
REM # Settings > System > Notifications > Additional settings #
REM ###########################################################
REM ***************************************************************
REM * Turn Off: Show the Windows welcome experience after updates *
REM * and when signed in to show what's new and suggested *
REM ***************************************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-310093Enabled" /t REG_DWORD /d 0x00000000 /f > NUL
REM *************************************************************
REM * Turn Off: Suggest ways to get the most out of Windows and *
REM * finish setting up this device *
REM *************************************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\UserProfileEngagement" /v "ScoobeSystemSettingEnabled" /t REG_DWORD /d 0x00000000 /f > NUL
REM *********************************************************
REM * Turn Off: Get tips and suggestions when using Windows *
REM *********************************************************
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d 0x00000000 /f > NUL
REM #############################
REM # End Notification Settings #
REM #############################
REM ###########################
REM # Remote Desktop Settings #
REM ###########################
REM *******************************************************
REM * Turn On: Remote Desktop *
REM * This setting can be found here: *
REM * Settings > System > Remote Desktop > Remote Desktop *
REM *******************************************************
powershell "Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name 'fDenyTSConnections' -Value 0" > NUL
powershell "Enable-NetFirewallRule -DisplayGroup 'Remote Desktop'" > NUL
REM As an alternative, the following command can be run in place of the second
REM command above to enable the firewall rule for Remote Desktop:
REM
REM netsh advfirewall firewall set rule group="remote desktop" new enable=yes
REM ###############################
REM # End Remote Desktop Settings #
REM ###############################
REM ######################
REM # Clipboard Settings #
REM ######################
REM #############################################
REM # The following settings can be found here: #
REM # Settings > System > Clipboard #
REM #############################################
REM *****************************
REM * Turn On: Clipboard history *
REM *****************************
REG ADD "HKCU\Software\Microsoft\Clipboard" /v "EnableClipboardHistory" /t REG_DWORD /d 0x00000001 /f > NUL
REM ##########################
REM # End Clipboard Settings #
REM ##########################
REM ###############################
REM # Network & Internet Settings #
REM ###############################
REM #############################################################################################################
REM # The following settings can be found here: #
REM # Settings > Network & internet > Advanced network settings > Advanced sharing settings > Private networks #
REM # NOTE: These settings will only be reflected in the GUI once the network is marked as a "Private" network. #
REM #############################################################################################################
REM **************************************************
REM * Turn On: Network discovery *
REM * NOTE: This is for the Private network profile. *
REM **************************************************
PowerShell "Set-NetFirewallRule -DisplayGroup 'Network Discovery' -Enabled True -Profile Private"
REM **************************************************
REM * Turn On: File and Printer Sharing *
REM * NOTE: This is for the Private network profile. *
REM **************************************************
PowerShell "Set-NetFirewallRule -DisplayGroup 'File And Printer Sharing' -Enabled True -Profile Private"
REM ###############################
REM # End Network & Internet Settings #
REM ###############################
REM ############################
REM # Personalization Settings #
REM ############################
REM #############################################
REM # The following settings can be found here: #
REM # Settings > Personalization > Lock screen #
REM #############################################
REM **************************************************************************************
REM * Turn Off: Get fun facts, tips, tricks, and more on your lock screen *
REM * NOTE: This option only shows up when when the lock screen is set to use a picture. *
REM **************************************************************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "RotatingLockScreenOverlayEnabled" /t REG_DWORD /d 0x00000000 /f > NUL
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338387Enabled" /t REG_DWORD /d 0x00000000 /f > NUL
REM ####################################################################################################
REM # The following setting can be found here (after applying the registry setting below): #
REM # NOTE: Select "View by: Large icons" or "View by: Small icons" when you first open Control Panel. #
REM # Control Panel > All Control Panel Items > Power Options > Change plan settings > #
REM # Change advanced power settings > Display > Console lock display off timeout #
REM ####################################################################################################
REM *************************************************************************************************
REM * Allow lock screen timeout to be changed *
REM * *
REM * By default, the lockscreen times out and goes to a blank screen after one minute and no way *
REM * is provided in the Windows GUI to change this. After implementing this setting, the user will *
REM * have access to a new setting in the Control Panel to change this timeout. This is especially *
REM * helpful if you want to be able to see a screensaver run while on the lockscreen. *
REM * *
REM * The registry entry will expose the new option in Control Panel in the location noted above. *
REM * In addition, we will set the screen timeout values below both for when the system is locked *
REM * and unlocked as well as on AC power and battery power. *
REM *************************************************************************************************
REM This registry entry enables the GUI setting noted above.
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\7516b95f-f776-4464-8c53-06167f40cc99\8EC4B3A5-6868-48c2-BE75-4F3044BE88A7" /v "attributes" /t REG_DWORD /d 0x00000002 /f > NUL
REM ******************************
REM * Other Screensaver Settings *
REM ******************************
REM ********************************************************************
REM * The selected screensaver is saved to: *
REM * *
REM * HKEY_CURRENT_USER\Control Panel\Desktop\SCRNSAVE.EXE as a REG_SZ *
REM * *
REM * Example: C:\WINDOWS\system32\ssText3d.scr *
REM * *
REM * To set no screensaver, delete the SCRNSAVE.EXE entry *
REM ********************************************************************
REM *********************************************************
REM * Set "On resume, display logon screen" to ON (checked) *
REM * Set to "0" to uncheck this option *
REM *********************************************************
REG ADD "HKCU\Control Panel\Desktop" /v "ScreenSaverIsSecure" /t REG_SZ /d "1" /f > NUL
REM ***************************************************
REM * Set the Screen saver "Wait" time to 30 minutes. *
REM * NOTE: This value is specified in seconds *
REM ***************************************************
REG ADD "HKCU\Control Panel\Desktop" /v "ScreenSaveTimeOut" /t REG_SZ /d "1800" /f > NUL
REM ****************************
REM * Display Timeout Settings *
REM ****************************
REM For the following 4 settings, the number at the end is the timeout in seconds. 0 = NEVER.
REM Display Timeout when system is unlocked (on AC Power)
powercfg.exe /setacvalueindex SCHEME_CURRENT SUB_VIDEO VIDEOIDLE 600 > NUL
REM Display Timeout when system is locked (on AC Power)
powercfg.exe /setacvalueindex SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK 3600 > NUL
REM Display Timeout when system is unlocked (on Battery)
powercfg.exe /setdcvalueindex SCHEME_CURRENT SUB_VIDEO VIDEOIDLE 300 > NUL
REM Display Timeout when system is locked (on Battery)
powercfg.exe /setdcvalueindex SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK 60 > NUL
REM Make the scheme active
powercfg.exe /setactive SCHEME_CURRENT > NUL
REM ***********************************
REM * End of Display Timeout Settings *
REM ***********************************
REM #################
REM # PowerSettings #
REM #################
REM On battery power, turn off my screen after 5 minutes
powercfg -change -monitor-timeout-dc 5 > NUL
REM On battery power, put my device to sleep after 15 minutes
powercfg -change -standby-timeout-dc 15 > NUL
REM * When plugged in, turn off my screen after *
REM * 30 minutes *
powercfg -change -monitor-timeout-ac 30 > NUL
REM * When plugged in, put my device to sleep after *
REM * NEVER *
powercfg -change -standby-timeout-ac 0 > NUL
REM #####################
REM # End PowerSettings #
REM #####################
REM #############################################
REM # The following settings can be found here: #
REM # Settings > Personalization > Start #
REM # #
REM # Enable only one of the following three #
REM # options. Comment out the others. By #
REM # default, we have "More pins" enabled. #
REM #############################################
REM **********************
REM * Layout - More pins *
REM **********************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_Layout" /t REG_DWORD /d 0x00000001 /f > NUL
REM ********************
REM * Layout - Default *
REM ********************
REM REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_Layout" /t REG_DWORD /d 0x00000000 /f > NUL
REM *********************************
REM * Layout - More recommendations *
REM *********************************
REM REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_Layout" /t REG_DWORD /d 0x00000002 /f > NUL
REM *************************************************
REM * Show Recently Added Apps *
REM * No known way to control this via command line *
REM *************************************************
REM #####################################################################################
REM # The following settings are all for "Show most used apps". #
REM # To use: Uncomment either the DISABLE or the ENABLE section below. This will cause #
REM # the option to be enabled or disabled, but it will also make this option greyed #
REM # out and unavailable in the GUI. #
REM # #
REM # To make the option selectabale again, run the commands in the section called #
REM # "Re-enable GUI Access for Show most used apps" below. This will make the setting #
REM # selectable in the GUI, but it will be disabled. You will need to enable it in #
REM # the GUI. #
REM # #
REM # By default, this file is set to turn disable "Show most used apps". #
REM # #
REM # These settings are still located in Settings > Personalization > Start #
REM #####################################################################################
REM ********************************************************************************
REM * Disable: Show most used apps *
REM * Note that this seting affects all users and greys out this option in the GUI *
REM ********************************************************************************
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "ShowOrHideMostUsedApps" /t REG_DWORD /d 0X00000002 /f > NUL
REG DELETE "HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "ShowOrHideMostUsedApps" /f > NUL 2>&1
REG DELETE "HKCU\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoStartMenuMFUprogramsList" /f > NUL 2>&1
REG DELETE "HKCU\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoInstrumentation" /f > NUL 2>&1
REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoStartMenuMFUprogramsList" /f > NUL 2>&1
REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoInstrumentation" /f > NUL 2>&1
REM ************************************************************************************
REM * Enable: Show most used apps *
REM * Note that this seting affects all users and greys out the this option in the GUI *
REM ************************************************************************************
REM REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "ShowOrHideMostUsedApps" /t REG_DWORD /d 0X00000001 /f > NUL
REM REG DELETE "HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "ShowOrHideMostUsedApps" /f > NUL 2>&1
REM REG DELETE "HKCU\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoStartMenuMFUprogramsList" /f > NUL 2>&1
REM REG DELETE "HKCU\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoInstrumentation" /f > NUL 2>&1
REM REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoStartMenuMFUprogramsList" /f > NUL 2>&1
REM REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoInstrumentation" /f > NUL 2>&1
REM **********************************************************************************
REM * Re-enable GUI Access for Show most used apps *
REM * Note that this seting will allow usage of the GUI to modify this setting again *
REM **********************************************************************************
REM REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "ShowOrHideMostUsedApps" /f > NUL 2>&1
REM REG DELETE "HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "ShowOrHideMostUsedApps" /f > NUL 2>&1
REM REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoStartMenuMFUprogramsList" /f > NUL 2>&1
REM REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoInstrumentation" /f > NUL 2>&1
REM REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoStartMenuMFUprogramsList" /f > NUL 2>&1
REM REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoInstrumentation" /f > NUL 2>&1
REM #############################################
REM # End of Settings for "Show most used apps" #
REM #############################################
REM *************************************************
REM * Disable: Show recently opened items in Start, *
REM * Jump Lists, and File Explorer *
REM * NOTE: Setting this option will clear the *
REM * recent items list. *
REM *************************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackDocs" /t REG_DWORD /d 0x00000000 /f > NUL
REM #############################################
REM # The following settings can be found here: #
REM # Settings > Personalization > Taskbar #
REM #############################################
REM ********************
REM * Turn Off: Search *
REM ********************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0x00000000 /f > NUL
REM *********************************************************
REM * Turn Off: Task view *
REM * NOTE: We are not using this option at this time. As a *
REM * result, the command is commented out at this time. *
REM *********************************************************
REM REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowTaskViewButton" /t REG_DWORD /d 0x00000000 /f > NUL
REM *****************************************
REM * Turn Off: Widgets *
REM * NOTE: This setting affects all users. *
REM *****************************************
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v "AllowNewsAndInterests" /t REG_DWORD /d 0x00000000 /f > NUL
REM ******************
REM * Turn Off: Chat *
REM ******************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d 0x00000000 /f > NUL
REM ############################################################
REM # The following settings can be found here: #
REM # Settings > Personalization > Taskbar > Taskbar behaviors #
REM ############################################################
REM *********************************************************
REM * Turn On: Automatically hide the taskbar *
REM * NOTE: We are not using this option at this time. As a *
REM * result, the command is commented out at this time. *
REM *********************************************************
powershell -command "&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=3;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer}" > NUL
REM ********************************************************************************
REM * Desktop icon spacing adjustment *
REM * *
REM * Default icon spacing settings: *
REM * *
REM * -1125 for "IconSpacing" and the same for IconVerticalSpacing". Set these to *
REM * -15 * spacing between icons in pixels. The entries below will set *
REM * "IconSpacing" to -1500, and "IconVerticalSpacing" to -1200. After setting, *
REM * either logoff/logon or reboot, then, right-click the desktop, choose "View", *
REM * unceck "Align icons to grid", and then recheck it. The new settings should *
REM * now be in effect. *
REM * *
REM * The lines to return the settings to defaults are also included below but are *
REM * disabled. *
REM * *
REM * There is no setting in the GUI to alter these settings. *
REM ********************************************************************************
REM Set values to increase horizontal and vertical spacing a little bit.
REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics" /v "IconSpacing" /t REG_SZ /d "-1500" /f > NUL
REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics" /v "IconVerticalSpacing" /t REG_SZ /d "-1200" /f > NUL
REM Set values to increase horizontal and vertical spacing a little bit. Currently this is commented out.
REM REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics" /v "IconSpacing" /t REG_SZ /d "-1125" /f > NUL
REM REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics" /v "IconVerticalSpacing" /t REG_SZ /d "-1125" /f > NUL
REM ################################
REM # End Personalization Settings #
REM ################################
REM ####################
REM # Account Settings #
REM ####################
REM ####################################################
REM # The following settings can be found here: #
REM # Settings > Accounts > Sign-in options #
REM ####################################################
REM ***********************************************************************************
REM * Turn off: For improved security, only allow Windows Hello sign-in for Microsoft *
REM * accounts on this device (Recommeded) *
REM * *
REM * When this setting is on, it enables passwordless sign-in. When using *
REM * Remote Desktop, you will need to enter a password. As a result, this *
REM * setting needs to be turned off. *
REM * *
REM * Note that this option may not show up in the GUI. I'm not 100% certain of the *
REM * reason for this, but suspect that it happens when Windows Hello is not enabled. *
REM ***********************************************************************************
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device" /v "DevicePasswordLessBuildVersion" /t REG_DWORD /d 0x00000000 /f > NUL
REM **********************************************
REM * Turn On: Automatically save my restartable *
REM * apps and restart them when I sign back in *
REM **********************************************
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "RestartApps" /t REG_DWORD /d 0x00000001 /f > NUL
REM ************************************************************************************
REM * Enable: Use my sign-in info to automatically finish setting up after an update *
REM * Affects all users, overrides setting in GUI, and greys out selection in GUI. *
REM * *
REM * Note that settings to Disable and also to user user choice via GUI are included *
REM * but commented out below. *
REM * *
REM * Please note that I currently have the command for this registry setting disabled *
REM * (commented) because it is on by default, but I wanted to make sure that this *
REM * setting was documented here. *
REM ************************************************************************************
REM REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "DisableAutomaticRestartSignOn" /t REG_DWORD /d 0x00000000 /f > NUL
REM Disable: Use my sign-in info to automatically finish setting up after an update
REM Affects all users, overrides setting in GUI, and greys out selection in GUI.
REM REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "DisableAutomaticRestartSignOn" /t REG_DWORD /d 0x00000001 /f > NUL
REM Restore user choice: Use my sign-in info to automatically finish setting up after an update
REM Affects all users, restores the ability to change this setting in the GUI.
REM REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "DisableAutomaticRestartSignOn" /f > NUL 2>&1
REM ###############################
REM # Privacy & Security Settings #
REM ###############################
REM #############################################
REM # The following settings can be found here: #
REM # Settings > Privacy & security > General #
REM #############################################
REM **************************************************************************
REM * Turn Off: Let apps show me personalized ads by using my advertising ID *
REM **************************************************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v "Enabled" /t REG_DWORD /d 0x00000000 /f > NUL
REM *****************************************************************************************
REM * Turn Off: Let websites show me locally relevant content by accessing my language list *
REM * *
REM * NOTE: We are not currently using this setting. Remove the "REM" below to enable it. *
REM *****************************************************************************************
REM REG ADD "HKCU\Control Panel\International\User Profile" /v "HttpAcceptLanguageOptOut" /t REG_DWORD /d 0x00000001 /f > NUL
REM ***********************************************************************************
REM * Turn Off: Let Windows improve Start and search results by tracking app launches *
REM ***********************************************************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackProgs" /t REG_DWORD /d 0x00000000 /f > NUL
REM ***********************************************************
REM * Turn Off: Show me suggested content in the Settings app *
REM ***********************************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d 0x00000000 /f > NUL
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353694Enabled" /t REG_DWORD /d 0x00000000 /f > NUL
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353696Enabled" /t REG_DWORD /d 0x00000000 /f > NUL
REM ##########################################################
REM # The following settings can be found here: #
REM # Settings > Privacy & security > Diagnostics & feedback #
REM ##########################################################
REM *******************************************
REM * Turn Off: Send optional diagnostic data *
REM *******************************************
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack" /v "ShowedToastAtLevel" /t REG_DWORD /d 0x00000001 /f > NUL
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0x00000001 /f > NUL
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "MaxTelemetryAllowed" /t REG_DWORD /d 0x00000001 /f > NUL
REM **********************************
REM * Turn Off: Tailored Experiences *
REM **********************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Privacy" /v "TailoredExperiencesWithDiagnosticDataEnabled" /t REG_DWORD /d 0x00000000 /f > NUL
REM **************************************
REM * Change Feedback Frequency to Never *
REM **************************************
REG ADD "HKCU\SOFTWARE\Microsoft\Siuf\Rules" /v "NumberOfSIUFInPeriod" /t REG_DWORD /d 0x00000000 /f > NUL
REG DELETE "HKCU\SOFTWARE\Microsoft\Siuf\Rules" /v "PeriodInNanoSeconds" /f > NUL 2>&1
REM #####################################################
REM # The following settings can be found here: #
REM # Settings > Privacy & security > Activity history #
REM #####################################################
REM *****************************************************
REM * Disable: Store my activity history on this device *
REM **********************************************************************************************
REM * NOTE: This registry setting will also disable this option in Windows Settings. If you need *
REM * to re-enable this option, use this registry entry: *
REM * REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "PublishUserActivities" /f *
REM **********************************************************************************************
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "PublishUserActivities" /t REG_DWORD /d 0x00000000 /f > NUL
REM ***********************************************
REM * Disable: Send Activity History to Microsoft *
REM **********************************************************************************************
REM * NOTE: This registry setting will also disable this option in Windows Settings. If you need *
REM * to re-enable this option, use this registry entry: *
REM * REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "UploadUserActivities" /f *
REM **********************************************************************************************
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "UploadUserActivities" /t REG_DWORD /d 0x00000000 /f > NUL
REM ######################################################
REM # The following settings can be found here: #
REM # Settings > Privacy & security > Search permissions #
REM ######################################################
REM *******************************************
REM * Turn Off: Search History on this Device *
REM *******************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsDeviceSearchHistoryEnabled" /t REG_DWORD /d 0x00000000 /f > NUL
REM ************************************
REM * Turn Off: Show search highlights *
REM ************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsDynamicSearchBoxEnabled" /t REG_DWORD /d 0x00000000 /f > NUL
REM ###################################
REM # End Privacy & Security Settings #
REM ###################################
REM #########################
REM # File Explorer Setting #
REM #########################
REM #############################################
REM # The following settings can be found here: #
REM # File Explorer > ... > Options > General #
REM #############################################
REM *******************************************
REM * Turn On: Open File Explorer to: This PC *
REM *******************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "LaunchTo" /t REG_DWORD /d 0x00000001 /f > NUL
REM *****************************************************************
REM * Turn Off: Show recently used files *
REM * NOTE: Turning this setting off clears the recent file history *
REM *****************************************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowRecent" /t REG_DWORD /d 0x00000000 /f > NUL
REM **********************************************************************
REM * Turn Off: Show frequently used folders *
REM * NOTE: Turning this setting off clears the frequent folders history *
REM **********************************************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowFrequent" /t REG_DWORD /d 0x00000000 /f > NUL
REM ****************************************
REM * Turn Off: Show files from Office.com *
REM ****************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowCloudFilesInQuickAccess" /t REG_DWORD /d 0x00000000 /f > NUL
REM #############################################
REM # The following settings can be found here: #
REM # File Explorer > ... > Options > View #
REM #############################################
REM ********************************************************
REM * Turn On: Decrease space between items (compact view) *
REM ********************************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "UseCompactMode" /t REG_DWORD /d 0x00000001 /f > NUL
REM ***********************************************
REM * Turn On: Display full path in the title bar *
REM ***********************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState" /v "FullPath" /t REG_DWORD /d 0x00000001 /f > NUL
REM ***************************************************
REM * Turn On: Show hidden files, folders, and drives *
REM ***************************************************
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Hidden" /t REG_DWORD /d 0x00000001 /f > NUL
REM *******************************
REM * Turn Off: Hide empty drives *
REM *******************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideDrivesWithNoMedia" /t REG_DWORD /d 0x00000000 /f > NUL
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideDrivesWithNoMedia" /f > NUL 2>&1
REM **************************************************
REM * Turn Off: Hide extensions for known file types *
REM **************************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0x00000000 /f > NUL
REM **************************************************************
REM * Turn On: Show encrypted and compressed NTFS files in color *
REM **************************************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowEncryptCompressedColor" /t REG_DWORD /d 0x00000001 /f > NUL
REM **********************************************
REM * Turn Off: Show sync provider notifications *
REM **********************************************
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowSyncProviderNotifications" /t REG_DWORD /d 0x00000000 /f > NUL
REM ********************************************
REM * Turn On: Use check boxes to select items *
REM ********************************************
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "AutoCheckSelect" /t REG_DWORD /d 0x00000001 /f > NUL
REM **********************************************
REM * Turn Off: Use Sharing Wizard (Recommended) *
REM **********************************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "SharingWizardOn" /t REG_DWORD /d 0x00000000 /f > NUL
REM **********************************
REM * Turn On: Expand to open folder *
REM **********************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "NavPaneExpandToCurrentFolder" /t REG_DWORD /d 0x00000001 /f > NUL
REM *****************************
REM * Turn On: Show all folders *
REM *****************************
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "NavPaneShowAllFolders" /t REG_DWORD /d 0x00000001 /f > NUL
REM ***************************
REM * Turn On: Show libraries *
REM ***************************
REG ADD "HKCU\Software\Classes\CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d 0x00000001 /f > NUL
REM *************************
REM * Turn On: Show Network *
REM ********************************************************************************************************************
REM * NOTE: This setting will override the setting in the GUI. To turn this back off use one of these two options: *
REM * *
REM * 1) Set the following registry entry (the GUI will still be disabled but the setting will be turned off): *
REM * REG ADD "HKCU\Software\Classes\CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" /v "System.IsPinnedToNameSpaceTree" *
REM * /t REG_DWORD /d 0x00000000 /f *
REM * *
REM * 2) To Re-enable the GUI run this command to delete the registry entry: *
REM * REG DELETE "HKCU\Software\Classes\CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" *
REM * /v "System.IsPinnedToNameSpaceTree" /f *
REM ********************************************************************************************************************
REG ADD "HKCU\Software\Classes\CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d 0x00000001 /f > NUL
REM *************************
REM * Turn On: Show This PC *
REM ********************************************************************************************************************
REM * NOTE: This setting will override the setting in the GUI. To turn this back off use one of these two options: *
REM * *
REM * 1) Set the following registry entry (the GUI will still be disabled but the setting will be turned off): *
REM * REG ADD "HKCU\Software\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /v "System.IsPinnedToNameSpaceTree" *
REM * /t REG_DWORD /d 0x00000000 /f *
REM * *
REM * 2) To Re-enable the GUI run this command to delete the registry entry: *
REM * REG DELETE "HKCU\Software\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" *
REM * /v "System.IsPinnedToNameSpaceTree" /f *
REM ********************************************************************************************************************
REG ADD "HKCU\Software\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d 0x00000001 /f > NUL
REM ##################################################################################################
REM # This section will allow you to customize the templates used to display file in File Explorer. #
REM # There is an automatic setting to allow Windows to pick the template best suited to each #
REM # folder (this is the default), General items, Documents, Pictures, Music, and Videos. #
REM # #
REM # Specifying a template for all drives and folders will disable Automatic Folder Type Discovery. #
REM # It does not affect the Quick access, This PC, Libraries, and Network shell folders. #
REM # #
REM # To implement this section, perform the following actions: #
REM # #
REM # Uncomment ONE of the six OPTION sections below. For example, Option 1. Option 1 is different #
REM # than the others. It resets everything back to default settings. Options 2 through 6 will set #
REM # the template type for all drives and folders to the type for the section you uncommented. #
REM # For example, Option 2 will set all drives and folders to the "General items" template. If a #
REM # user subsequently selects View > <Some View Option> in File Explorer, that will override the #
REM # setting of these registry entries, but only for those locations to which the user applied the #
REM # View settings. This allows the user to create their own set of exceptions. #
REM # #
REM # In sections 2 through 6, if you comment out the sections "Resets folder view settings, window #
REM # size and position of all folders" and "To reset 'Apply to Folders' views to default for all #
REM # folder types", then it will still set the template type for all drives and folders to the type #
REM # for the section you uncommented, but it will NOT alter the custom View settings that a user #
REM # may have set. #
REM ##################################################################################################
REM ******************************************************************************
REM * Option 1 *
REM * *
REM * This is the default setting. This will reset the template and views of all *
REM * folders back to default, and enable Automatic Folder Type Discovery. *
REM ******************************************************************************
REM Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /F > NUL 2>&1
REM Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" /F > NUL 2>&1
REM *************************************************************
REM * Option 2 *
REM * *
REM * Specify General items Template for All Drives and Folders *
REM *************************************************************
:: Resets folder view settings, window size and position of all folders
Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /F > NUL 2>&1
Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" /F > NUL 2>&1
:: To reset "Apply to Folders" views to default for all folder types
REG Delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults" /F > NUL 2>&1
:: Specify General Items template to all folders
REG ADD "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell" /V FolderType /T REG_SZ /D NotSpecified /F > NUL
REM *********************************************************
REM * Option 3 *
REM * *
REM * Specify Documents Template for All Drives and Folders *
REM *********************************************************
:: Resets folder view settings, window size and position of all folders
REM Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /F > NUL 2>&1
REM Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" /F > NUL 2>&1
:: To reset "Apply to Folders" views to default for all folder types
REM REG Delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults" /F > NUL 2>&1
:: Specify Documents template to all folders
REM REG ADD "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell" /V FolderType /T REG_SZ /D Documents /F > NUL
REM ********************************************************
REM * Option 4 *
REM * *
REM * Specify Pictures Template for All Drives and Folders *
REM ********************************************************
:: Resets folder view settings, window size and position of all folders
REM Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /F > NUL 2>&1
REM Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" /F > NUL 2>&1
:: To reset "Apply to Folders" views to default for all folder types
REM REG Delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults" /F > NUL 2>&1
:: Specify Pictures template to all folders
REM REG ADD "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell" /V FolderType /T REG_SZ /D Pictures /F > NUL
REM *****************************************************
REM * Option 5 *
REM * *
REM * Specify Music Template for All Drives and Folders *
REM *****************************************************
:: Resets folder view settings, window size and position of all folders
REM Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /F > NUL 2>&1
REM Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" /F > NUL 2>&1
:: To reset "Apply to Folders" views to default for all folder types
REM REG Delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults" /F > NUL 2>&1
:: Specify Music template to all folders
REM REG ADD "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell" /V FolderType /T REG_SZ /D Music /F > NUL
REM ******************************************************
REM * Option 6 *
REM * *
REM * Specify Videos Template for All Drives and Folders *
REM ******************************************************
:: Resets folder view settings, window size and position of all folders
REM Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /F > NUL 2>&1
REM Reg Delete "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" /F > NUL 2>&1
:: To reset "Apply to Folders" views to default for all folder types
REM REG Delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults" /F > NUL 2>&1
REM ********************************************************************
REM * Common to all 6 options *
REM * *
REM * Each of the six options needs to end with a restart of explorer. *
REM * The following lines stop and restart explorer. *
REM ********************************************************************
:: To kill and restart explorer
taskkill /f /im explorer.exe > NUL
start explorer.exe > NUL
REM ################################################
REM # End of Section to Configure Folder Templates #
REM ################################################
REM ################################
REM # End of File Explorer Setting #
REM ################################
REM *************************************************************************************************
REM * Disable Error Reporting *
REM * *
REM * When a program stops responding, Windows can automatically report the problem to Microsoft *
REM * and check for a solution. By default Windows will send a problem report to Microsoft. This *
REM * option disables this. To re-enable, run these commands in an an elevated command prompt: *
REM * *
REM * REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v "Disabled" *
REM * /t REG_DWORD /d 0x00000000 /f *
REM *************************************************************************************************
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d 0x00000001 /f > NUL
REM ######################################################################################################
REM # The following four settings all affect the operation of AutoPlay: #
REM # #
REM # PLEASE ENABLE ONLY ONE OF THE FOUR AVAILABLE OPTIONS. By default we have option #1 enabled. #
REM # #
REM # Option #1 affects AutoPlay for ALL media and devices. This setting can be re-enabled in the GUI as #
REM # described for that setting below. #
REM # #
REM # Option #2 and #3 below apply to individual parts of AutoPlay as detailed below: #
REM # #
REM # Option #2 disables AutoPlay ONLY for volume type devices. #
REM # #
REM # Option #3 disables AutoPlay for ONLY non-volume type devices. #
REM # #
REM # Option #4 restores all AutoPlay settings to defaults (only for the current user). #
REM ######################################################################################################
REM #########################################################################################
REM # OPTION #1: Disable AutoPlay for ALL Devices (Both Volume and Non-Volume Type Devices) #
REM ####################################################################################################
REM # The following setting can be found here: #
REM # Settings > Bluetooth & devices > AutoPlay > Use AutoPlay for all media and devices #
REM # #
REM # This setting can also be found in Control Panel at this location: #
REM # NOTE: Select "View by: Large icons" or "View by: Small icons" when you first open Control Panel. #
REM # Control Panel > All Control Panel Items > AutoPlay > Use AutoPlay for all media and devices #
REM ####################################################################################################
REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers" /v "DisableAutoplay" /f > NUL 2>&1
REM ##############################################
REM # OPTION #2: Disable AutoPlay for All Drives #
REM #################################################################################
REM # The following setting can be found here: #
REM # There is no setting within Setup for this Option. This setting, when enabled, #
REM # can result in a pop-up dialog asking what to do with the device. Note that #
REM # this setting only affects AutoPlay on volume type devices. #
REM #################################################################################
REM # NOTE: This setting applies to ALL users. #
REM #######################################################################################################################
REM # To re-enable AutoPlay on volume type devices, run these registry commands: #
REM # #
REM # REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /f > NUL 2>&1 #
REM # REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /f > NUL 2>&1 #
REM #######################################################################################################################
REM Remove the "REM" from the following two lines to enable this option
REM REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /f > NUL 2>&1
REM REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 0x000000ff /f > NUL
REM ######################################################
REM # OPTION #3: Disable AutoPlay for Non-Volume Devices #
REM ##################################################################################
REM # The following setting can be found here: #
REM # There is no setting within Setup for this Option. This setting, when enabled, #
REM # can result in a pop-up dialog asking what to do with the device. Note that #
REM # this setting only affects AutoPlay on non-volume type devices such as a phone. #
REM ##################################################################################
REM # NOTE: This setting applies to ALL users. #
REM #################################################################################################
REM # To re-enable AutoPlay for Non-Volume Devices, run these registry commands: #
REM # #
REM # REG DELETE "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v "NoAutoplayfornonVolume" /f #
REM # REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoAutoplayfornonVolume" /f #
REM #################################################################################################
REM Remove the "REM" from the following two lines to enable this option
REM REG DELETE "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v "NoAutoplayfornonVolume" /f > NUL 2>&1
REM REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoAutoplayfornonVolume" /t REG_DWORD /d 0x00000001 /f > NUL
REM ##############################################################
REM # OPTION #4: Reset AutoPlay to Defaults for the Current User #
REM ####################################################################################################
REM # Defaults can also be reset by going to the following location in the Control Panel: #
REM # NOTE: Select "View by: Large icons" or "View by: Small icons" when you first open Control Panel. #
REM # Control Panel > All Control Panel Items > AutoPlay > Reset all defaults (at bottom of screen) #
REM ####################################################################################################
REM Remove the "REM" from the following two lines to enable this option
REM REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlersDefaultSelection" /f > NUL 2>&1
REM REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\UserChosenExecuteHandlers" /f > NUL 2>&1
REM ############################
REM # End of AutoPlay Settings #
REM ############################
REM ###########################
REM # Customize Control Panel #
REM ###########################
REM *********************************************
REM * Set Control Panel to Display in Icon Mode *
REM *********************************************
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "ForceClassicControlPanel" /t REG_DWORD /d 0x00000001 /f > NUL
REM ######################################
REM # End of Control Panel Customization #
REM ######################################
REM ###################################
REM # Misc and Uncategorized Settings #
REM ###################################
REM *********************************************************
REM * Turn on: Remove System Requirements not Met Watermark *
REM * This setting applies to some insider builds *
REM * *
REM * This setting is currently commented out *
REM *********************************************************
REM REG ADD "HKEY_CURRENT_USER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d 0x00000000 /f > NUL
REM REG ADD "HKEY_CURRENT_USER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d 0x00000000 /f > NUL
REM *******************************************************
REM * Turn off: Screen Rotation Lock *
REM * ON = 0; OFF = 1 *
REM * *
REM * Setting Slateenable to 0 will prevent auto rotation *
REM * *
REM * Currently commented out *
REM *******************************************************
REM REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AutoRotation" /v "Enable" /t REG_DWORD /d 0x00000001 /f > NUL
REM REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AutoRotation" /v "SlateEnable" /t REG_DWORD /d 0x00000001 /f > NUL
REM ##########################################
REM # End of Misc and Uncategorized Settings #
REM ##########################################