Privacy and Security Add Turn On or Off Location Services Context Menu in Windows 11


  • Staff
Location_banner.png

This tutorial will show you how to add a turn on or off "Location Services" context menu for all users in Windows 10 and Windows 11.

The Location Services context menu added by this tutorial will allow you to quickly turn on or turn off location services for the device (all users) or for apps (current user) on demand.

Microsoft operates a location service that helps determine the precise geographic location of your Windows device. The precise location of your device allows apps to give you directions, show shops and restaurants that are near you, and more.

Many apps and services request location information from your device, and the Windows location service gives you control over which apps are allowed to access your precise location.

How the location settings work

Location services is a device-wide setting that can be controlled by the device administrator. When turned on, it enables certain Windows features—such as auto-setting the time zone or Find my device—to function properly. When this location setting is enabled, the Microsoft location service will use a combination of global positioning service (GPS), nearby wireless access points, cell towers, and your IP address (or default location) to determine your device’s location. Depending on the capabilities of your device, your device’s location can be determined with varying degrees of accuracy and may in some cases be determined precisely.

You must be signed in as an administrator to add and remove the Location Services desktop context menu.

You must be signed in as an administrator to use Turn On for Device and Turn Off for Device that is applied to all users.

All users can use Turn On for Apps and Turn Off for Apps that is only applied to the current user.

If one or more apps are currently using your device location through the Windows location service, you’ll see the Location notification icon on the taskbar corner to let you know.



EXAMPLE: "Location Services" context menu

In Windows 11, you will need to click/tap on Show more options first by default, then click/tap on Location Services to either Turn On or Turn Off.


Show_more_options.png
Location_Services_context_menu.png



Here's How:

1 Do step 2 (add) or step 3 (remove) below for what you would like to do.

2 Add "Location Services" to Desktop Context Menu

A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Add_Location_Services_context_menu.reg


(Contents of .reg file)
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location]
"Icon"="taskbarcpl.dll,-9"
"MUIVerb"="Location Services"
"Position"="Bottom"
"SubCommands"=""

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\001flyout]
"MUIVerb"="Turn On for Device"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\001flyout\command]
@="PowerShell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/s,/c, Reg Add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location /v Value /t REG_SZ /d \"Allow\" /f' -Verb runAs\""


[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\002flyout]
"MUIVerb"="Turn Off for Device"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\002flyout\command]
@="PowerShell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/s,/c, Reg Add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location /v Value /t REG_SZ /d \"Deny\" /f' -Verb runAs\""

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\003flyout]
"MUIVerb"="Turn On for Apps"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\003flyout\command]
@="cmd /s /c \"Reg Add HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location /v Value /t REG_SZ /d \"Allow\" /f\""

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\004flyout]
"MUIVerb"="Turn Off for Apps"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\004flyout\command]
@="cmd /s /c \"Reg Add HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location /v Value /t REG_SZ /d \"Deny\" /f\""

3 Remove "Location Services" from Desktop Context Menu

This is the default setting.


A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Remove_Location_Services_context_menu.reg


(Contents of .reg file)
Code:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location]

4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 You can now delete the downloaded .reg file if you like.


That's it,
Shawn Brink


 

Attachments

  • Location.png
    Location.png
    10.4 KB · Views: 11
  • Remove_Location_Services_context_menu.reg
    544 bytes · Views: 43
  • Add_Location_Services_context_menu.reg
    3.9 KB · Views: 46
Last edited:
@Brink

If user has a dark theme , the arrow on the context menu is not visible as the pointer/arrow is black.
To remedy that the subkey value needs to be:

"Icon"="taskbarcpl.dll,-10"

Screenshot 2023-12-25 182412.png
 

My Computers

System One System Two

  • OS
    Win11 All /Debian/Arch
    Computer type
    Laptop
    Manufacturer/Model
    ASUSTeK COMPUTER INC. TUF Gaming FX705GM
    CPU
    2.20 gigahertz Intel i7-8750H Hyper-threaded 12 cores
    Motherboard
    ASUSTeK COMPUTER INC. FX705GM 1.0
    Memory
    24428 Megabytes
    Graphics Card(s)
    Intel(R) UHD Graphics 630 / NVIDIA GeForce GTX 1060
    Sound Card
    Intel(R) Display Audio / Realtek(R) Audio
    Monitor(s) Displays
    Integrated Monitor (17.3"vis)
    Screen Resolution
    FHD 1920X1080 16:9
    Hard Drives
    2 SSD SATA/NVM Express 1.3
    WDS500G2B0A-00SM50 500.1 GB
    WDCSDAPNUW-1002 256 GB
    PSU
    19V DC 6.32 A 120 W
    Cooling
    Dual Fans
    Mouse
    MS Bluetooth
    Internet Speed
    Fiber 1GB Cox -us & ADSL Bouygues -fr
    Browser
    Edge Canary- Firefox Nightly
    Antivirus
    Windows Defender
    Other Info
    VMs of Windows 11 stable/Beta/Dev/Canary
    VM of XeroLinux- Arch based & Debian 12
  • Operating System
    Windows 11 Insider Canary
    Computer type
    Laptop
    Manufacturer/Model
    ASUS X751BP
    CPU
    AMD Dual Core A6-9220
    Motherboard
    ASUS
    Memory
    8 GB
    Graphics card(s)
    AMD Radeon R5 M420
    Sound Card
    Realtek
    Monitor(s) Displays
    17.3
    Screen Resolution
    1600X900 16:9
    Hard Drives
    1TB 5400RPM
Is it possible to use the enable and disable "Turn Off for Device" portions of this in powershell script?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP
    CPU
    CPU Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
    Memory
    16GB
    Screen Resolution
    1080
Is it possible to use the enable and disable "Turn Off for Device" portions of this in powershell script?
Hello, :alien:

You should be able to use the same commands from the context menu in the script.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
Back
Top Bottom