This tutorial will show you how to add change "Network Location" to the desktop context menu for all users in Windows 10 and Windows 11.
A network location identifies the type of network that a PC is connected to with a network adapter and automatically sets the appropriate Windows Defender Firewall settings for that location.
Adding this Network Location context menu will make it fast and easy to change your current network connection to be a private network or public network on demand.
Public network = Your device is not discoverable on the network. By default, the public network location type is assigned to any new networks when they are first connected. A public network is considered to be shared with the world, with no protection between the local computer and any other computer. Therefore, the Windows Firewall rules associated with the public profile are the most restrictive. This blocks the following apps and services from working: PlayTo, file sharing, network discovery, and automatic setup of network printers, TVs, and other devices.
Private network = Your device is discoverable on the network. Select this if you need file sharing or use apps that communicate over this network. You should know and trust the people or devices on the network.
You must be signed in as an administrator to add, remove, and use the change "Network Location" context menu.
EXAMPLE: "Restart Start menu" context menu
In Windows 11, you will need to click/tap on Show more options first by default, then click/tap on Network Location.
Do step 2 (add) or step 3 (remove) below for what you would like to do.
(Contents of .reg file)
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\DesktopBackground\shell\NetworkLocation] "MUIVerb"="Network Location" "Icon"="imageres.dll,-25" "Position"="Middle" "SubCommands"="" [HKEY_CLASSES_ROOT\DesktopBackground\shell\NetworkLocation\shell\01menu] "HasLUAShield"="" "MUIVerb"="Change to Private network" [HKEY_CLASSES_ROOT\DesktopBackground\shell\NetworkLocation\shell\01menu\command] @="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/c,PowerShell $net = get-netconnectionprofile;Set-NetConnectionProfile -Name $net.Name -NetworkCategory Private' -Verb RunAs\"" [HKEY_CLASSES_ROOT\DesktopBackground\shell\NetworkLocation\shell\02menu] "HasLUAShield"="" "MUIVerb"="Change to Public network" [HKEY_CLASSES_ROOT\DesktopBackground\shell\NetworkLocation\shell\02menu\command] @="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/c,PowerShell $net = get-netconnectionprofile;Set-NetConnectionProfile -Name $net.Name -NetworkCategory Public' -Verb RunAs\""
This is the default setting.
(Contents of .reg file)
Windows Registry Editor Version 5.00 [-HKEY_CLASSES_ROOT\DesktopBackground\shell\NetworkLocation]
Save the .reg file to your desktop.
Double click/tap on the downloaded .reg file to merge it.
When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.
You can now delete the downloaded .reg file if you like.