Add Windows Settings to your Desktop Context Menu

Add Windows Settings to your Desktop Context Menu

With Microsoft slowly forcing the Windows 10 User to migrate to their Windows Settings dialog, which is accessed by left-clicking on Start, then clicking the Settings cog, I've added a basic PowerShell Script for our Forum members and/or guests which if they so choose can download and run to add a context menu for Settings to allow another way to get to the precise Settings they desire to reach.

I will not go into any great depth in explaining this Script, but for those interested in studying the Script, who may want to learn from it, or even better, modify and improve it, I'll post the complete block of code involved.

Note: If you run this Script it will make several modifications to your Registry!

So without further ado, here is the code:

Code:
# New Hives to store the more important modifications necessary for adding a right-click Context Menu for Windows Settings
New-Item -Name "DesktopBackground" -Path 'HKCU:\SOFTWARE\Classes\' -ItemType Directory
New-Item -Name "Shell" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\' -ItemType Directory
New-Item -Name "Settings" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings' -Name "Icon" -PropertyType String -Value "SystemSettingsBroker.exe"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings' -Name "Position" -PropertyType String -Value "Middle"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings' -Name "SubCommands" -PropertyType String -Value ""


# Settings Home
New-Item -Name "Shell" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\' -ItemType Directory
New-Item -Name "01SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\01SubCmd' -Name "Icon" -PropertyType String -Value "SystemSettingsBroker.exe"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\01SubCmd' -Name "MUIVerb" -PropertyType String -Value "Settings"

New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\01SubCmd' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\01SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:"


# System
New-Item -Name "02SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory
New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\02SubCmd\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\02SubCmd' -Name "CommandFlags" -PropertyType DWORD -Value "0x00000020"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\02SubCmd' -Name "MUIVerb" -PropertyType String -Value "System"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\02SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:display"


# Devices
New-Item -Name "03SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory
New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\03SubCmd\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\03SubCmd' -Name "MUIVerb" -PropertyType String -Value "Devices"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\03SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:bluetooth"


# Network & Internet
New-Item -Name "04SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory
New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\04SubCmd\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\04SubCmd' -Name "MUIVerb" -PropertyType String -Value "Network && Internet"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\04SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:network"


# Personalization
New-Item -Name "05SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory
New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\05SubCmd\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\05SubCmd' -Name "MUIVerb" -PropertyType String -Value "Personalization"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\05SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:personalization"


# Apps
New-Item -Name "06SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory
New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\06SubCmd\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\06SubCmd' -Name "MUIVerb" -PropertyType String -Value "Apps"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\06SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:appsfeatures"


# Accounts
New-Item -Name "07SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory
New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\07SubCmd\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\07SubCmd' -Name "MUIVerb" -PropertyType String -Value "Accounts"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\07SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:yourinfo"


# Time & Language
New-Item -Name "08SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory
New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\08SubCmd\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\08SubCmd' -Name "MUIVerb" -PropertyType String -Value "Time && Language"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\08SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:dateandtime"


# Gaming
New-Item -Name "09SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory
New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\09SubCmd\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\09SubCmd' -Name "MUIVerb" -PropertyType String -Value "Gaming"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\09SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:gaming-gamebar"


# Ease of Access

New-Item -Name "10SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory
New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\10SubCmd\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\10SubCmd' -Name "MUIVerb" -PropertyType String -Value "Ease of Access"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\10SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:easeofaccess-narrator"


# Cortana
New-Item -Name "11SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory
New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\11SubCmd\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\11SubCmd' -Name "MUIVerb" -PropertyType String -Value "Cortana"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\11SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:cortana"

# Privacy
New-Item -Name "12SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory
New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\12SubCmd\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\12SubCmd' -Name "MUIVerb" -PropertyType String -Value "Privacy"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\12SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:privacy"


# Update & Security
New-Item -Name "13SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory
New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\13SubCmd\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\13SubCmd' -Name "MUIVerb" -PropertyType String -Value "Update && Security"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\13SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:windowsupdate"


# Mixed Reality
New-Item -Name "14SubCmd" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\' -ItemType Directory
New-Item -Name "Command" -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\14SubCmd\' -ItemType Directory

New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\14SubCmd' -Name "MUIVerb" -PropertyType String -Value "Mixed Reality"
New-ItemProperty -Path 'HKCU:\SOFTWARE\Classes\DesktopBackground\Shell\Settings\Shell\14SubCmd\Command' -Name "(Default)" -PropertyType String -Value "explorer ms-settings:holographic"

Note: I've isolated each main setting in its own block of code. There may be some settings you never intend to use, or simply do not want a shortcut to in your context menu, when you right-click on your Desktop.

If you do not want them, then simply delete the relevant block of code, before running the Script.

You can copy & paste the above code into your standard PowerShell console, or your PowerShell ISE script pane, then run it, as no changes made here require Administrative privileges.

You can copy & paste the above code into a Notepad file, then after saving it, simply rename the file to a name of your choice and replace the .txt extension with .ps1

Alternately you can also download the attached .ps1 file and simply right-click on it and select Run in PowerShell if you prefer.

In conclusion, after running the Script there is no need to restart your computer as the effects will take place immediately while still signed-in.

To show you the effect of running this script, below is a before and after image sample:

Before running Script right-clicking Desktop produces:

contextmenudefault.png


After running script right-clicking Desktop now has Windows Settings added to the context menu with its own list of choices:

contextmenumodified.png


One final note: This script only modifies the Current User in the Registry, hence the lack of necessity to run the Script with a user account that belongs to the Administrative Group. If you wish to modify the Script to affect all users on your computer then replace the HKCU:\ with HKLM:\ throughout the code. Doing this will require you then to run the by running PowerShell with the (Run as administrator) mode.

Finally to reverse the changes back to default settings [ meaning you remove Windows Settings from your right-click Desktop Context Menu ] simply do the following:

  • Press Windows key + R to open the Run dialog
  • In the Run dialog type regedit then click OK
  • Click yes to the User Account Control prompt
  • On the left pane of the Registry Editor expand the hives to:
HKEY_CURRENT_USER
— Software
— Classes

  • Now locate the sub-hive beneath Classes named DesktopBackground and right-click on this and select Delete
  • Press F5 to refresh the Registry in memory
  • Close the Registry Editor
There is no need to restart computer as changes will take immediate effect.

Sample image

sample.png

Regards,

Regedit32
Author
Regedit32
Downloads
3,318
First release
Last update

More resources from Regedit32

Top