Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ScribbleGhost/514f4cf8107a41ac4b8c3152df81c122 to your computer and use it in GitHub Desktop.
Save ScribbleGhost/514f4cf8107a41ac4b8c3152df81c122 to your computer and use it in GitHub Desktop.

My Windows 10 settings for Virtual Machines

How to use it

Apply the script for a single user

It's just a batch file, so all you have to do is run it as an administrator on the user for which you want to apply it. Note that the computer will restart immediately after.

Apply the script for all users on the computer

Alternative 1: Runonce-method

If you want the script to apply for all users on the computer I suggest making use of the runonce method. That is:

  • Copy this script somewhere to the computer. For example C:\MDT\scripts\runonce\
  • Use the command below in CMD to modify the default registry (ntuser.dat)
reg load HKLM\DEFAULT c:\users\default\ntuser.dat
REG add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Runonce" /V "Runonce" /T "REG_SZ" /D "C:\MDT\scripts\runonce\runonce.bat" /F 1>NUL 2>&1
reg unload HKLM\DEFAULT
  • Now, when a new user logs in, because of the registry addition, the script will be run and the settings will apply for the user.

Alternative 2: Manually run the script for each user

Or you can just run the script from whichever user you are logged into without any automagic.

Why all this mess?

Well, there are some issues modifying new user profiles in Windows 10 these days:

  • Usually one would use CopyProfile during a sysprep to make the user settings "copy over" to the other settings. But copyprofile has been broken for a long time and Microsoft does not care. Perhaps they are working on something new...
  • Another way to go is to configure the default profile in Windows 10, but this has some limitations, more specifically registry changes to "HKLM\DEFAULT\Control Panel". Also other changes that are not registry dependent will not be applied to the other users.
REM ----------------------------------------------------------------------------------------------------------
REM ### Apps and app suggestions
REM ----------------------------------------------------------------------------------------------------------
REM TITLE: Turn Off Automatic Installation of Suggested Apps in Windows 10
REM LINK: https://www.tenforums.com/tutorials/68217-turn-off-automatic-installation-suggested-apps-windows-10-a.html
REM OPTIONS: 0x00000001=On, 0x00000000=Off
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /V "SilentInstalledAppsEnabled" /T "REG_DWORD" /D "0x00000000" /F 1>NUL 2>&1
REM TITLE: Turn Off Suggested Content Settings App Windows 10 Turn Off Suggested Content In Settings
REM LINK: https://www.tenforums.com/tutorials/100541-turn-off-suggested-content-settings-app-windows-10-a.html
REM OPTIONS: 0x00000001=On, 0x00000000=Off
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /V "SubscribedContent-338393Enabled" /T "REG_DWORD" /D "0x00000000" /F 1>NUL 2>&1
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /V "SubscribedContent-353694Enabled" /T "REG_DWORD" /D "0x00000000" /F 1>NUL 2>&1
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /V "SubscribedContent-353696Enabled" /T "REG_DWORD" /D "0x00000000" /F 1>NUL 2>&1
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /V "SubscribedContent-338388Enabled" /T "REG_DWORD" /D "0x00000000" /F 1>NUL 2>&1
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /V "SubscribedContent-338389Enabled" /T "REG_DWORD" /D "0x00000000" /F 1>NUL 2>&1
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /V "SystemPaneSuggestionsEnabled" /T "REG_DWORD" /D "0x00000000" /F 1>NUL 2>&1
REM ----------------------------------------------------------------------------------------------------------
REM ### Desktop, taskbar and notifications
REM ----------------------------------------------------------------------------------------------------------
REM TITLE: Show file extensions in Windows explorer
REM LINK: https://www.tenforums.com/tutorials/62842-hide-show-file-name-extensions-windows-10-a.html
REM OPTIONS: "1"=On, "0"=Off
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "HideFileExt" /T REG_DWORD /D "0x00000000" /F 1>NUL 2>&1
REM TITLE: Remove Search Icon from Windows 10 Taskbar
REM LINK: N/A
REM OPTIONS: "1"=On, "0"=Off
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /V "SearchboxTaskbarMode" /T REG_DWORD /D "0x00000000" /F 1>NUL 2>&1
REM TITLE: Remove Task View from Windows 10 Taskbar
REM LINK: N/A
REM OPTIONS: "1"=On, "0"=Off
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "ShowTaskViewButton" /T REG_DWORD /D "0x00000000" /F 1>NUL 2>&1
REM TITLE: Always show all icons in the notification area
REM LINK: N/A
REM OPTIONS: "1"=Never show, "0"=Always show
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /V EnableAutoTray /T REG_DWORD /D "0x00000000" /F 1>NUL 2>&1
REM TITLE: Remove People Button from Taskbar
REM LINK: N/A
REM OPTIONS: "1"=On, "0"=Off
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" /V PeopleBand /T REG_DWORD /D "0x00000000" /F 1>NUL 2>&1
REM TITLE:
REM LINK:
REM OPTIONS: Color in RGB for example "255 0 0" for red
REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop" /v WallPaper /T REG_SZ /D " " /F 1>NUL 2>&1
REG ADD "HKEY_CURRENT_USER\Control Panel\Colors" /v Background /T REG_SZ /D "0 66 117" /F 1>NUL 2>&1
REM TITLE: Disable Microsoft Edge shortcut creation on desktop for new user profiles
REM LINK: https://social.technet.microsoft.com/wiki/contents/articles/51546.windows-10-build-1803-registry-tweak-to-disable-microsoft-edge-shortcut-creation-on-desktop.aspx
REM OPTIONS: REG DEL the registry key to enable
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer /v "DisableEdgeDesktopShortcutCreation" /t REG_DWORD /D "0x00000001" /F 1>NUL 2>&1
DEL "%userprofile%\Desktop\Microsoft Edge.lnk"
REM TITLE: Open This Computer to My Computer
REM LINK: https://www.tenforums.com/tutorials/3734-open-pc-quick-access-file-explorer-windows-10-a.html
REM OPTIONS: "1"=On, "0"=Off
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "LaunchTo" /t REG_DWORD /D "0x00000001" /F 1>NUL 2>&1
REM TITLE: Hide "Recently used files" in Quick access in Windows Explorer
REM LINK: https://www.tenforums.com/tutorials/2713-add-remove-recent-files-quick-access-windows-10-a.html
REM OPTIONS: REG DEL values
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "Start_TrackDocs" /T "REG_DWORD" /D "0x00000000" /F 1>NUL 2>&1
REM TITLE: Hide "Frequently used files" in Quick access in Windows Explorer
REM LINK: https://www.tenforums.com/tutorials/2712-add-remove-frequent-folders-quick-access-windows-10-a.html
REM OPTIONS: "1"=On, "0"=Off
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /V "ShowFrequent" /T "REG_DWORD" /D "0x00000000" /F 1>NUL 2>&1
REM TITLE: Turn on "Show all folders" in Windows Explorer navigation pane
REM LINK: https://www.tenforums.com/tutorials/7078-turn-off-show-all-folders-windows-10-navigation-pane.html
REM OPTIONS: "0x00000001"=Turn on, "0x00000000"=Turn off
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "NavPaneShowAllFolders" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REM TITLE: Disable making "-shortcut" text for shortcuts
REM LINK: https://www.tenforums.com/tutorials/7078-turn-off-show-all-folders-windows-10-navigation-pane.html
REM OPTIONS: "0x00000001"=Turn on, "0x00000000"=Turn off
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /V link /T REG_Binary /D 00000000 /F 1>NUL 2>&1
REG DEL "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\NamingTemplates" /V ShortcutNameTemplate /F 1>NUL 2>&1
REM TITLE: Hide Meet Now icon in the taskbar
REM LINK: https://www.tenforums.com/tutorials/165990-how-add-remove-meet-now-icon-taskbar-windows-10-a.html
REM OPTIONS: "0x00000001"=Hide, "0x00000000"=Show
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V "HideSCAMeetNow" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V "HideSCAMeetNow" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REM TITLE: News and Interests on Taskbar
REM LINK: https://www.tenforums.com/tutorials/178178-how-enable-disable-news-interests-taskbar-windows-10-a.html#option2
REM OPTIONS: "0x00000001"=Hide, "0x00000000"=Show
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" /V "EnableFeeds" /T "REG_DWORD" /D "0x00000000" /F 1>NUL
REM ----------------------------------------------------------------------------------------------------------
REM ### Privacy settings
REM ----------------------------------------------------------------------------------------------------------
REM TITLE: Disable "Use sign-in info to auto finish setting up device and reopen apps after update or restart" (for all users)
REM LINK: https://www.tenforums.com/tutorials/49963-use-sign-info-auto-finish-after-update-restart-windows-10-a.html
REM OPTIONS: 1 means disable and 0 means enable
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /V "DisableAutomaticRestartSignOn" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REM TITLE: Disable "Let websites provide locally relevant content by accessing my language list"
REM LINK: https://www.tenforums.com/tutorials/82980-turn-off-website-access-language-list-windows-10-a.html
REM OPTIONS: 1 means disable and 0 means enable
REG ADD "HKCU\Control Panel\International\User Profile" /V "HttpAcceptLanguageOptOut" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REM TITLE: Disable "Let apps use advertising ID to make ads more interesting to you based on your app activity (Turning this off will reset your ID.)"
REM LINK: https://www.tenforums.com/tutorials/76453-enable-disable-advertising-id-relevant-ads-windows-10-a.html
REM OPTIONS: 1 means disable and 0 means enable
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" /V "DisabledByGroupPolicy" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REM TITLE: Disable "Let Windows track app launches to improve Start and search results"
REM LINK: https://www.tenforums.com/tutorials/82967-turn-off-app-launch-tracking-windows-10-a.html
REM OPTIONS: 1 means disable and 0 means enable
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "Start_TrackProgs" /T "REG_DWORD" /D "0x00000000" /F 1>NUL
REM TITLE: Disable "Online Speech recognition"
REM LINK: https://www.tenforums.com/tutorials/101902-turn-off-online-speech-recognition-windows-10-a.html
REM OPTIONS: 1 means disable and 0 means enable
REG ADD "HKCU\Software\Microsoft\Speech_OneCore\Settings\OnlineSpeechPrivacy" /V "HasAccepted" /T "REG_DWORD" /D "0x00000000" /F 1>NUL
REM TITLE: Disable "Personal typing / Ink and typing personalization"
REM LINK: https://www.tenforums.com/tutorials/118127-turn-off-inking-typing-personalization-windows-10-a.html
REM OPTIONS: To diable set RestrictImplicitInkCollection and RestrictImplicitTextCollection to 1 and HarvestContacts and AcceptedPrivacyPolicy to 0.
REG ADD "HKCU\Software\Microsoft\InputPersonalization" /V "RestrictImplicitInkCollection" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REG ADD "HKCU\Software\Microsoft\InputPersonalization" /V "RestrictImplicitTextCollection" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REG ADD "HKCU\Software\Microsoft\InputPersonalization\TrainedDataStore" /V "HarvestContacts" /T "REG_DWORD" /D "0x00000000" /F 1>NUL
REG ADD "HKCU\Software\Microsoft\Personalization\Settings" /V "AcceptedPrivacyPolicy" /T "REG_DWORD" /D "0x00000000" /F 1>NUL
REM TITLE: Set diagnostic data to Basic instead of full
REM LINK: https://www.tenforums.com/tutorials/7032-change-diagnostic-data-settings-windows-10-a.html#option5
REM OPTIONS: 1 equals basic and 0 equals full.
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /V "AllowTelemetry" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REM TITLE: Turn off "Improve inking and typing"
REM LINK: https://www.tenforums.com/tutorials/107050-turn-off-improve-inking-typing-recognition-windows-10-a.html
REM OPTIONS: 0 means off 1 means on.
REG ADD "HKCU\Software\Microsoft\Input\TIPC" /V "Enabled" /T "REG_DWORD" /D "0x00000000" /F 1>NUL
REM TITLE: Turn off "Tailored experiences based on the diagnostic data settings"
REM LINK: https://www.tenforums.com/tutorials/76426-turn-off-tailored-experiences-diagnostic-data-windows-10-a.html
REM OPTIONS: 0 means off 1 means on.
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Privacy" /V "TailoredExperiencesWithDiagnosticDataEnabled" /T "REG_DWORD" /D "0x00000000" /F 1>NUL
REM TITLE: Turn off "View diagnostic data"
REM LINK: https://www.tenforums.com/tutorials/103059-enable-disable-diagnostic-data-viewer-windows-10-a.html#option4
REM OPTIONS: 1 means off 0 means on.
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /V "DisableDiagnosticDataViewer" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REM TITLE: Turn off Microsoft asking for your feedback a.k.a "Feedback frequency"
REM LINK: https://www.tenforums.com/tutorials/2441-change-feedback-frequency-windows-10-a.html
REM OPTIONS: 1 means off 0 means on.
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /V "DoNotShowFeedbackNotifications" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REM TITLE: Turn off Microsoft asking for your feedback a.k.a "Feedback frequency"
REM LINK: https://www.tenforums.com/tutorials/113553-turn-off-automatic-recommended-troubleshooting-windows-10-a.html
REM OPTIONS: 1= Only fix critical problems for me 2 = Ask me before fixing problems 3 = Tell me when problems get fixed 4= Fix problems for me without asking
REG ADD "HKLM\SOFTWARE\Microsoft\WindowsMitigation" /V "UserPreference" /T "REG_DWORD" /D "0x00000002" /F 1>NUL
REM TITLE: Disable Collect Activity History (requires sign out and sign in)
REM LINK: https://www.tenforums.com/tutorials/100341-enable-disable-collect-activity-history-windows-10-a.html
REM OPTIONS: 0 means off 1 means on
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /V "PublishUserActivities" /T "REG_DWORD" /D "0x00000000" /F 1>NUL
REM TITLE: Disable Collect Activity History (requires sign out and sign in)
REM LINK: https://www.tenforums.com/tutorials/100341-enable-disable-collect-activity-history-windows-10-a.html
REM OPTIONS: 0 means off 1 means on
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /V "PublishUserActivities" /T "REG_DWORD" /D "0x00000000" /F 1>NUL
REM TITLE: Turn off "Location service for your account and apps"
REM LINK: https://www.tenforums.com/tutorials/100341-enable-disable-collect-activity-history-windows-10-a.html
REM OPTIONS: 0 means off 1 means on
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" /V "Value" /T "REG_SZ" /D "Deny" /F 1>NUL
REM TITLE: Turn off "Location service for your account and apps"
REM LINK: https://www.tenforums.com/tutorials/13225-turn-off-location-services-windows-10-a.html
REM OPTIONS: 0 means off 1 means on
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" /V "Value" /T "REG_SZ" /D "Deny" /F 1>NUL
REM TITLE: Turn off "Allow apps to access your location"
REM LINK: https://www.tenforums.com/tutorials/13225-turn-off-location-services-windows-10-a.html
REM OPTIONS:
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" /V "Value" /T "REG_SZ" /D "Deny" /F 1>NUL
REM TITLE: Turn off Location for this device (disable allow access to location on this device)
REM LINK: https://www.tenforums.com/tutorials/13225-turn-off-location-services-windows-10-a.html
REM OPTIONS:
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" /V "Value" /T "REG_SZ" /D "Deny" /F 1>NUL
REM TITLE: Never ask for feedback
REM LINK: https://www.tenforums.com/tutorials/2441-how-change-feedback-frequency-windows-10-a.html
REM OPTIONS:
REG ADD "HKCU\Software\Microsoft\Windows\Siuf\Rules" /V "NumberOfSIUFInPeriod" /T "REG_DWORD" /D "0x00000000" /F 1>NUL 2>&1
REM TITLE: Search online and include web results from Bing
REM LINK: https://www.tenforums.com/tutorials/25016-turn-off-search-online-include-web-results-windows-10-a.html
REM OPTIONS: 0x00000001 = Turn Off 0x00000000 = Turn on
REG ADD "HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer" /V "DisableSearchBoxSuggestions" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REM ----------------------------------------------------------------------------------------------------------
REM ### Explorer and context menu
REM ----------------------------------------------------------------------------------------------------------
REM TITLE: Remove folder shortcuts in "This PC"
REM LINK:
REM OPTIONS: Reg DEL removes the shortcut
REM Remove Desktop From This PC
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" /F 1>NUL
REM Remove Documents From This PC
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}" /F 1>NUL
REM Remove Downloads From This PC
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}" /F 1>NUL
REM Remove Music From This PC
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}" /F 1>NUL
REM Remove Pictures From This PC
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}" /F 1>NUL
REM Remove Videos From This PC
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}" /F 1>NUL
REM Remove 3D Objects
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" /F 1>NUL
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" /F 1>NUL
REM TITLE: Remove Default Desktop Icons (This PC, Users folder, Network, Recycle bin, Control Panel)
REM LINK: https://www.tenforums.com/tutorials/6942-add-remove-default-desktop-icons-windows-10-a.html
REM OPTIONS: See link for description. "0x00000001=remove shortcut"
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /V "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" /V "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /V "{59031a47-3f72-44a7-89c5-5595fe6b30ee}" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" /V "{59031a47-3f72-44a7-89c5-5595fe6b30ee}" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /V "{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" /V "{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /V "{645FF040-5081-101B-9F08-00AA002F954E}" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" /V "{645FF040-5081-101B-9F08-00AA002F954E}" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /V "{5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" /V "{5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REM TITLE: Remove default extensions in the "new file" context menu
REM LINK:
REM OPTIONS: "reg delete" to delete the extension. "REG ADD" to add
reg delete "HKCR\.accdb\Access.Application.16\ShellNew" /F 1>NUL 2>&1
reg delete "HKCR\.mdb\ShellNew" /F 1>NUL 2>&1
reg delete "HKCR\.bmp\ShellNew" /F 1>NUL 2>&1
reg delete "HKCR\.docx\Word.Document.12\ShellNew" /F 1>NUL 2>&1
reg delete "HKCR\.xlsx\Excel.Sheet.12\ShellNew" /v "FileName" /T REG_SZ /D "C:\Program Files\Microsoft Office\Root\VFS\Windows\ShellNew\excel12.xlsx" /F 1>NUL 2>&1
reg delete "HKCR\.pptx\PowerPoint.Show.12\ShellNew" /F 1>NUL 2>&1
reg delete "HKCR\.pub\Publisher.Document.16\ShellNew" /F 1>NUL 2>&1
reg delete "HKCR\.rtf\ShellNew" /F 1>NUL 2>&1
reg delete "HKCR\.zip\CompressedFolder\ShellNew" /F 1>NUL 2>&1
reg delete "HKCR\.zip\ShellNew" /F 1>NUL 2>&1
reg delete "HKEY_CLASSES_ROOT\.contact\ShellNew" /F 1>NUL 2>&1
REM TITLE: Add “Open elevated PowerShell window here” (Only works in Batch file)
REM LINK: https://www.tenforums.com/tutorials/25721-open-elevated-windows-powershell-windows-10-a.html
REM OPTIONS:
REG ADD "HKCR\Directory\Background\shell\PowerShellAsAdmin" /V "" /D "Open PowerShell window here as administrator" /F 1>NUL 2>&1
REG DELETE "HKCR\Directory\Background\shell\PowerShellAsAdmin" /V "Extended" /F 1>NUL 2>&1
REG ADD "HKCR\Directory\Background\shell\PowerShellAsAdmin" /V "HasLUAShield" /T "REG_SZ" /D "" /F 1>NUL 2>&1
REG ADD "HKCR\Directory\Background\shell\PowerShellAsAdmin" /V "Icon" /T "REG_SZ" /D "powershell.exe" /F 1>NUL 2>&1
REG ADD "HKCR\Directory\Background\shell\PowerShellAsAdmin\command" /V "" /D "PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%%%V ^&^& start PowerShell ^&^& exit' -Verb RunAs\"" /F 1>NUL 2>&1
REG ADD "HKCR\Directory\shell\PowerShellAsAdmin" /V "" /D "Open PowerShell window here as administrator" /F 1>NUL 2>&1
REG DELETE "HKCR\Directory\shell\PowerShellAsAdmin" /V "Extended" /F 1>NUL 2>&1
REG ADD "HKCR\Directory\shell\PowerShellAsAdmin" /V "HasLUAShield" /T "REG_SZ" /D "" /F 1>NUL 2>&1
REG ADD "HKCR\Directory\shell\PowerShellAsAdmin" /V "Icon" /T "REG_SZ" /D "powershell.exe" /F 1>NUL 2>&1
REG ADD "HKCR\Directory\shell\PowerShellAsAdmin\command" /V "" /D "PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%%%V ^&^& start PowerShell ^&^& exit' -Verb RunAs\"" /F 1>NUL 2>&1
REG ADD "HKCR\Drive\shell\PowerShellAsAdmin" /V "" /D "Open PowerShell window here as administrator" /F 1>NUL 2>&1
REG DELETE "HKCR\Drive\shell\PowerShellAsAdmin" /V "Extended" /F 1>NUL 2>&1
REG ADD "HKCR\Drive\shell\PowerShellAsAdmin" /V "HasLUAShield" /T "REG_SZ" /D "" /F 1>NUL 2>&1
REG ADD "HKCR\Drive\shell\PowerShellAsAdmin" /V "Icon" /T "REG_SZ" /D "powershell.exe" /F 1>NUL 2>&1
REG ADD "HKCR\Drive\shell\PowerShellAsAdmin\command" /V "" /D "PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%%%V ^&^& start PowerShell ^&^& exit' -Verb RunAs\"" /F 1>NUL 2>&1
REG ADD "HKCR\LibraryFolder\Background\shell\PowerShellAsAdmin" /V "" /D "Open PowerShell window here as administrator" /F 1>NUL 2>&1
REG DELETE "HKCR\LibraryFolder\Background\shell\PowerShellAsAdmin" /V "Extended" /F 1>NUL 2>&1
REG ADD "HKCR\LibraryFolder\Background\shell\PowerShellAsAdmin" /V "HasLUAShield" /T "REG_SZ" /D "" /F 1>NUL 2>&1
REG ADD "HKCR\LibraryFolder\Background\shell\PowerShellAsAdmin" /V "Icon" /T "REG_SZ" /D "powershell.exe" /F 1>NUL 2>&1
REG ADD "HKCR\LibraryFolder\Background\shell\PowerShellAsAdmin\command" /V "" /D "PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%%%V ^&^& start PowerShell ^&^& exit' -Verb RunAs\"" /F 1>NUL 2>&1
REM TITLE: Add "Open elevated command window here" (Only works in Batch file)
REM LINK: https://www.tenforums.com/tutorials/59686-open-command-window-here-administrator-add-windows-10-a.html
REM OPTIONS:
REG ADD "HKCR\Directory\shell\OpenCmdHereAsAdmin" /V "" /D "Open command window here as administrator" /F 1>NUL 2>&1
REG DELETE "HKCR\Directory\shell\OpenCmdHereAsAdmin" /V "Extended" /F 1>NUL 2>&1
REG ADD "HKCR\Directory\shell\OpenCmdHereAsAdmin" /V "Icon" /T "REG_SZ" /D "imageres.dll,-5324" /F 1>NUL 2>&1
REG ADD "HKCR\Directory\shell\OpenCmdHereAsAdmin\command" /V "" /D "PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%%%V' -Verb RunAs\"" /F 1>NUL 2>&1
REG ADD "HKCR\Directory\Background\shell\OpenCmdHereAsAdmin" /V "" /D "Open command window here as administrator" /F 1>NUL 2>&1
REG DELETE "HKCR\Directory\Background\shell\OpenCmdHereAsAdmin" /V "Extended" /F 1>NUL 2>&1
REG ADD "HKCR\Directory\Background\shell\OpenCmdHereAsAdmin" /V "Icon" /T "REG_SZ" /D "imageres.dll,-5324" /F 1>NUL 2>&1
REG ADD "HKCR\Directory\Background\shell\OpenCmdHereAsAdmin\command" /V "" /D "PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%%%V' -Verb RunAs\"" /F 1>NUL 2>&1
REG ADD "HKCR\Drive\shell\OpenCmdHereAsAdmin" /V "" /D "Open command window here as administrator" /F 1>NUL 2>&1
REG DELETE "HKCR\Drive\shell\OpenCmdHereAsAdmin" /V "Extended" /F 1>NUL 2>&1
REG ADD "HKCR\Drive\shell\OpenCmdHereAsAdmin" /V "Icon" /T "REG_SZ" /D "imageres.dll,-5324" /F 1>NUL 2>&1
REG ADD "HKCR\Drive\shell\OpenCmdHereAsAdmin\command" /V "" /D "PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%%%V' -Verb RunAs\"" /F 1>NUL 2>&1
REG ADD "HKCR\LibraryFolder\background\shell\OpenCmdHereAsAdmin" /V "" /D "Open command window here as administrator" /F 1>NUL 2>&1
REG DELETE "HKCR\LibraryFolder\background\shell\OpenCmdHereAsAdmin" /V "Extended" /F 1>NUL 2>&1
REG ADD "HKCR\LibraryFolder\background\shell\OpenCmdHereAsAdmin" /V "Icon" /T "REG_SZ" /D "imageres.dll,-5324" /F 1>NUL 2>&1
REG ADD "HKCR\LibraryFolder\background\shell\OpenCmdHereAsAdmin\command" /V "" /D "PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%%%V' -Verb RunAs\"" /F 1>NUL 2>&1
REM ----------------------------------------------------------------------------------------------------------
REM ### Visual performance options
REM ----------------------------------------------------------------------------------------------------------
REM TITLE: Desktop Wallpaper Jpeg Quality Reduction Disable Windows 10 Disable Jpeg Desktop Wallpaper Import Quality
REM LINK: http://www.tenforums.com/tutorials/65668-desktop-wallpaper-jpeg-quality-reduction-disable-windows-10-a.html
REM: OPTIONS: Retain compression: REG DELETE "HKCU\Control Panel\Desktop" /V "JPEGImportQuality" /F 1>NUL 2>&1
REG ADD "HKCU\Control Panel\Desktop" /V "JPEGImportQuality" /T "REG_DWORD" /D "0x00000064" /F 1>NUL 2>&1
REM TITLE: Show window contents while dragging
REM LINK: https://www.tenforums.com/tutorials/27449-turn-off-show-window-contents-while-dragging-windows-10-a.html
REM: OPTIONS: 1 = On 0 = Off
REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop" /V DragFullWindows /T REG_SZ /D 1 /F
REM TITLE: Smooth edges of screen fonts
REM LINK: https://www.tenforums.com/tutorials/126775-enable-disable-font-smoothing-windows.html
REM: OPTIONS: 2 = On 0 = Off
REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop" /V FontSmoothing /T REG_SZ /D 2 /F
REM TITLE: Show borders on Windows (NOTE: This is a combination of multiple settings)
REM LINK: https://www.tenforums.com/tutorials/6377-change-visual-effects-settings-windows-10-a.html#option4
REM: OPTIONS: 9032078010000000 =
REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop" /V UserPreferencesMask /t REG_BINARY /d 9032078010000000 /F
REM TITLE: Animate Windows when Minimizing and Maximizing
REM LINK: https://www.tenforums.com/tutorials/126788-enable-disable-animate-windows-when-minimizing-maximizing.html
REM: OPTIONS: 2 = On 0 = Off
REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics" /V MinAnimate /T REG_SZ /D 0 /F
REM TITLE: Nobody knows what this does, but Microsoft recommend turning it off for VMs
REM LINK: https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/rds-vdi-recommendations-2004
REM: OPTIONS: Nobody knows
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /V ShellState /t REG_BINARY /d 240000003C2800000000000000000000 /F
REM TITLE: Thumbnail Previews in File Explorer
REM LINK: https://www.tenforums.com/tutorials/18834-enable-disable-thumbnail-previews-file-explorer-windows-10-a.html
REM: OPTIONS: 0 = Thumbnails for picture files 1 = No thumbnails, only Icons
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V IconsOnly /t REG_DWORD /D 0 /F
REM TITLE: Translucent Selection Rectangle on Desktop
REM LINK: https://www.tenforums.com/tutorials/113254-turn-off-translucent-selection-rectangle-desktop-windows.html
REM: OPTIONS:0 = Off 1 = On
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V ListviewAlphaSelect /t REG_DWORD /D 1 /F
REM TITLE: Drop Shadows for Icon Labels
REM LINK: https://www.tenforums.com/tutorials/126714-add-remove-drop-shadows-icon-labels-desktop-windows.html
REM: OPTIONS:0 = Remove 1 = Add
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V ListviewShadow /t REG_DWORD /D 1 /F
REM TITLE: show NTFS compressed files with another color
REM LINK: https://www.tenforums.com/software-apps/117664-win10xpe-build-your-own-rescue-media-28.html
REM: OPTIONS: ...
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V ShowCompColor /t REG_DWORD /D 1 /F
REM TITLE: Show Pop-up Description for Folder and Desktop Items
REM LINK: https://www.tenforums.com/tutorials/89239-hide-show-pop-up-descriptions-windows-10-a.html
REM: OPTIONS:0 = Hide 1 = Show
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V ShowInfoTip /t REG_DWORD /D 1 /F
REM TITLE: Animations in the Taskbar
REM LINK: https://www.tenforums.com/tutorials/126795-enable-disable-animations-taskbar-windows-10-a.html
REM: OPTIONS:0 = Remove 1 = Add
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V TaskbarAnimations /t REG_DWORD /D 0 /F
REM TITLE: Change Visual Effects Settings
REM LINK: https://www.tenforums.com/tutorials/6377-change-visual-effects-settings-windows-10-a.html
REM: OPTIONS: 0 (zero) for Let Windows choose what's best for my computer settings. 1 for Adjust for best appearance settings. 2 for Adjust for best Performance settings. 3 for Custom settings.
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" /V VisualFXSetting /t REG_DWORD /d 3 /F
REM TITLE: Peek at Desktop
REM LINK: https://www.tenforums.com/tutorials/47266-turn-off-peek-desktop-windows-10-a.html#option4
REM: OPTIONS:0 = Off 1 = On
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\DWM" /V EnableAeroPeek /t REG_DWORD /D 0 /F
REM TITLE:
REM LINK:
REM: OPTIONS:
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\DWM" /V AlwaysHiberNateThumbnails /t REG_DWORD /D 0 /F
REM TITLE: Save Taskbar Thumbnail Previews to Cache in Windows
REM LINK: https://www.tenforums.com/tutorials/126722-enable-disable-save-taskbar-thumbnail-previews-cache-windows.html
REM: OPTIONS:0 = Disable 1 = Enable
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" /V 01 /t REG_DWORD /D 0 /F
REM TITLE: Let apps run in the background: Photos
REM LINK:
REM: OPTIONS:
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.Windows.Photos_8wekyb3d8bbwe" /V Disabled /t REG_DWORD /D 1 /F
REM TITLE: Let apps run in the background: Photos
REM LINK:
REM: OPTIONS:
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.Windows.Photos_8wekyb3d8bbwe" /V DisabledByUser /t REG_DWORD /D 1 /F
REM TITLE: Let apps run in the background: Skype
REM LINK:
REM: OPTIONS:
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.SkypeApp_kzf8qxf38zg5c" /V Disabled /t REG_DWORD /D 1 /F
REM TITLE: Let apps run in the background: Skype
REM LINK:
REM: OPTIONS:
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.SkypeApp_kzf8qxf38zg5c" /V DisabledByUser /t REG_DWORD /D 1 /F
REM TITLE: Let apps run in the background: Your Phone
REM LINK:
REM: OPTIONS:
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.YourPhone_8wekyb3d8bbwe" /V Disabled /t REG_DWORD /D 1 /F
REM TITLE: Let apps run in the background: Your Phone
REM LINK:
REM: OPTIONS:
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.YourPhone_8wekyb3d8bbwe" /V DisabledByUser /t REG_DWORD /D 1 /F
REM TITLE: Let apps run in the background: Edge
REM LINK:
REM: OPTIONS:
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.MicrosoftEdge_8wekyb3d8bbwe" /V Disabled /t REG_DWORD /D 1 /F
REM TITLE: Let apps run in the background: Edge
REM LINK:
REM: OPTIONS:
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.MicrosoftEdge_8wekyb3d8bbwe" /V DisabledByUser /t REG_DWORD /D 1 /F
REM TITLE: Get even more out of Windows message
REM LINK: https://www.tenforums.com/tutorials/137645-turn-off-get-even-more-out-windows-suggestions-windows-10-a.html
REM: OPTIONS: 0 = Off 1 = On
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\UserProfileEngagement" /V ScoobeSystemSettingEnabled /t REG_DWORD /D 0 /F
REM ----------------------------------------------------------------------------------------------------------
REM ### Security settings
REM ----------------------------------------------------------------------------------------------------------
REM TITLE: Enable XTS-AES 256-bit BitLocker encryption for all drives
REM LINK: https://www.tenforums.com/tutorials/36827-change-bitlocker-encryption-method-cipher-strength-windows-10-a.html
REM OPTIONS:
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\FVE" /V "EncryptionMethodWithXtsOs" /T "REG_DWORD" /D "0x00000007" /F 1>NUL 2>&1
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\FVE" /V "EncryptionMethodWithXtsFdv" /T "REG_DWORD" /D "0x00000007" /F 1>NUL 2>&1
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\FVE" /V "EncryptionMethodWithXtsRdv" /T "REG_DWORD" /D "0x00000007" /F 1>NUL 2>&1
REM ----------------------------------------------------------------------------------------------------------
REM ### Power options and lock screen
REM ----------------------------------------------------------------------------------------------------------
REM TITLE: Lock Screen in Windows 10 - Enable od disable showing lock screen after inactivity
REM LINK: https://www.tenforums.com/tutorials/6567-enable-disable-lock-screen-windows-10-a.html
REM OPTIONS: "0x00000001"=Do not use lock screen, "0x00000000"=Use lock screen
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\SessionData" /V "AllowLockScreen" /T "REG_DWORD" /D "0x00000000" /F 1>NUL
REM OPTIONS: "0x00000000"=Use lock screen "0x00000001"=Do not use lock screen
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization" /V "NoLockScreen" /T "REG_DWORD" /D "0x00000001" /F 1>NUL
REM TITLE: Disable sleep when connected to power
REM LINK: https://www.tenforums.com/tutorials/158493-how-change-computer-sleep-after-time-windows-10-a.html
REM OPTIONS: 0 = Never sleep or you can write how many minutes of idle before sleeping
powercfg -change -standby-timeout-ac 0
shutdown /r /t 0
<#
.SYNOPSIS
Remove built-in apps (modern apps) from Windows 10.
.DESCRIPTION
This script will remove all built-in apps with a provisioning package that's not specified in the 'white-list' in this script.
It supports MDT and ConfigMgr usage, but only for online scenarios, meaning it can't be executed during the WinPE phase.
For a more detailed list of applications available in each version of Windows 10, refer to the documentation here:
https://docs.microsoft.com/en-us/windows/application-management/apps-in-windows-10
.EXAMPLE
.\Invoke-RemoveBuiltinApps.ps1
.NOTES
FileName: Invoke-RemoveBuiltinApps.ps1
Author: Nickolaj Andersen
Contact: @NickolajA
Created: 2019-03-10
Updated: 2021-02-02
Version history:
1.0.0 - (2019-03-10) Initial script updated with help section and a fix for randomly freezing
1.1.0 - (2019-05-03) Added support for Windows 10 version 1903 (19H1)
1.1.1 - (2019-08-13) Removed the part where it was disabling/enabling configuration for Store updates, as it's not needed
1.1.2 - (2019-10-03) Removed unnecessary left over functions and updated catch statements so that they actually log the current app that could not be removed
1.2.0 - (2021-02-02) Added support for Windows 10 version 2004 (20H1) and 20H2
#>
Begin {
# White list of Features On Demand V2 packages
$WhiteListOnDemand = "NetFX3|DirectX|Tools.DeveloperMode.Core|Language|InternetExplorer|ContactSupport|OneCoreUAP|WindowsMediaPlayer|Hello.Face|Notepad|MSPaint|PowerShell.ISE|ShellComponents"
# White list of appx packages to keep installed
$WhiteListedApps = New-Object -TypeName System.Collections.ArrayList
$WhiteListedApps.AddRange(@(
"Microsoft.DesktopAppInstaller",
"Microsoft.StorePurchaseApp",
"Microsoft.WindowsStore"
))
# Windows 10 version 1809
$WhiteListedApps.AddRange(@(
"Microsoft.HEIFImageExtension",
"Microsoft.VP9VideoExtensions",
"Microsoft.WebMediaExtensions",
"Microsoft.WebpImageExtension"
))
# Windows 10 version 1903
# No new apps
# Windows 10 version 1909
$WhiteListedApps.AddRange(@(
"Microsoft.Outlook.DesktopIntegrationServicess"
))
# Windows 10 version 2004
$WhiteListedApps.AddRange(@(
"Microsoft.VCLibs.140.00"
))
# Windows 10 version 20H2
$WhiteListedApps.AddRange(@(
"Microsoft.MicrosoftEdge.Stable"
))
}
Process {
# Functions
function Write-LogEntry {
param(
[parameter(Mandatory=$true, HelpMessage="Value added to the RemovedApps.log file.")]
[ValidateNotNullOrEmpty()]
[string]$Value,
[parameter(Mandatory=$false, HelpMessage="Name of the log file that the entry will written to.")]
[ValidateNotNullOrEmpty()]
[string]$FileName = "RemovedApps.log"
)
# Determine log file location
$LogFilePath = Join-Path -Path $env:windir -ChildPath "Temp\$($FileName)"
# Add value to log file
try {
Out-File -InputObject $Value -Append -NoClobber -Encoding Default -FilePath $LogFilePath -ErrorAction Stop
}
catch [System.Exception] {
Write-Warning -Message "Unable to append log entry to $($FileName) file"
}
}
# Initial logging
Write-LogEntry -Value "Starting built-in AppxPackage, AppxProvisioningPackage and Feature on Demand V2 removal process"
# Determine provisioned apps
$AppArrayList = Get-AppxProvisionedPackage -Online | Select-Object -ExpandProperty DisplayName
# Loop through the list of appx packages
foreach ($App in $AppArrayList) {
Write-LogEntry -Value "Processing appx package: $($App)"
# If application name not in appx package white list, remove AppxPackage and AppxProvisioningPackage
if (($App -in $WhiteListedApps)) {
Write-LogEntry -Value "Skipping excluded application package: $($App)"
}
else {
# Gather package names
$AppPackageFullName = Get-AppxPackage -Name $App | Select-Object -ExpandProperty PackageFullName -First 1
$AppProvisioningPackageName = Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -like $App } | Select-Object -ExpandProperty PackageName -First 1
# Attempt to remove AppxPackage
if ($AppPackageFullName -ne $null) {
try {
Write-LogEntry -Value "Removing AppxPackage: $($AppPackageFullName)"
Remove-AppxPackage -Package $AppPackageFullName -ErrorAction Stop | Out-Null
}
catch [System.Exception] {
Write-LogEntry -Value "Removing AppxPackage '$($AppPackageFullName)' failed: $($_.Exception.Message)"
}
}
else {
Write-LogEntry -Value "Unable to locate AppxPackage for current app: $($App)"
}
# Attempt to remove AppxProvisioningPackage
if ($AppProvisioningPackageName -ne $null) {
try {
Write-LogEntry -Value "Removing AppxProvisioningPackage: $($AppProvisioningPackageName)"
Remove-AppxProvisionedPackage -PackageName $AppProvisioningPackageName -Online -ErrorAction Stop | Out-Null
}
catch [System.Exception] {
Write-LogEntry -Value "Removing AppxProvisioningPackage '$($AppProvisioningPackageName)' failed: $($_.Exception.Message)"
}
}
else {
Write-LogEntry -Value "Unable to locate AppxProvisioningPackage for current app: $($App)"
}
}
}
Write-LogEntry -Value "Starting Features on Demand V2 removal process"
# Get Features On Demand that should be removed
try {
$OSBuildNumber = Get-WmiObject -Class "Win32_OperatingSystem" | Select-Object -ExpandProperty BuildNumber
# Handle cmdlet limitations for older OS builds
if ($OSBuildNumber -le "16299") {
$OnDemandFeatures = Get-WindowsCapability -Online -ErrorAction Stop | Where-Object { $_.Name -notmatch $WhiteListOnDemand -and $_.State -like "Installed" } | Select-Object -ExpandProperty Name
}
else {
$OnDemandFeatures = Get-WindowsCapability -Online -LimitAccess -ErrorAction Stop | Where-Object { $_.Name -notmatch $WhiteListOnDemand -and $_.State -like "Installed" } | Select-Object -ExpandProperty Name
}
foreach ($Feature in $OnDemandFeatures) {
try {
Write-LogEntry -Value "Removing Feature on Demand V2 package: $($Feature)"
# Handle cmdlet limitations for older OS builds
if ($OSBuildNumber -le "16299") {
Get-WindowsCapability -Online -ErrorAction Stop | Where-Object { $_.Name -like $Feature } | Remove-WindowsCapability -Online -ErrorAction Stop | Out-Null
}
else {
Get-WindowsCapability -Online -LimitAccess -ErrorAction Stop | Where-Object { $_.Name -like $Feature } | Remove-WindowsCapability -Online -ErrorAction Stop | Out-Null
}
}
catch [System.Exception] {
Write-LogEntry -Value "Removing Feature on Demand V2 package failed: $($_.Exception.Message)"
}
}
}
catch [System.Exception] {
Write-LogEntry -Value "Attempting to list Feature on Demand V2 packages failed: $($_.Exception.Message)"
}
# Complete
Write-LogEntry -Value "Completed built-in AppxPackage, AppxProvisioningPackage and Feature on Demand V2 removal process"
}
copy /y "%%SCRIPTROOT%%\custom\TaskbarLayoutModification.xml" "C:\Users\Default\AppData\Local\Microsoft\Windows\Shell"
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ /v "LayoutXMLPath" /d "C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\TaskbarLayoutModification.xml"
<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6" />
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
@echo off
START /wait taskkill /f /im OneDrive.exe
START /wait %SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall
rd "%UserProfile%\OneDrive" /Q /S
rd "%LocalAppData%\Microsoft\OneDrive" /Q /S
rd "%ProgramData%\Microsoft OneDrive" /Q /S
REG Delete "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
REG Delete "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
REG load "hku\Default" "C:\Users\Default\NTUSER.DAT"
REG delete HKU\default\software\Microsoft\Windows\CurrentVersion\Run /v OneDriveSetup /f
REG unload "hku\Default"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment