最近有客戶詢問如何透過script 方式來修改Location Services, 基本上就需要透過registry 方式來修改 (這可以參考Option 4),
不過以下我將教大家, 5種方式可以Turn On or Turn Off, 可以選擇你自己需要的方式來做.
Option One: To Turn On or Off Location Service for your Account and Apps in Action Center
Note: Location must be turned on for the device by an administrator using Option Two or Option Five before you will be able to do this option.
1.開啟 Action Center (Win 鍵 + A)
2.選擇 Location quick action button 來將 location services 開啟或關閉.
Option Two: To Turn On or Off Location Service for this Device in Settings
Note: You must be signed in as an administrator to be able to do this option.
1. 開啟 Setting , 選取 Privacy 選項
2. Turn on
Note: This is the default setting.
3. Turn Off
選擇 Location , 點選 Change , 選擇 Off
Option Three: To Turn On or Off Location Service for your Account and Apps in Settings
Note: Location must be turned on for the device by an administrator using Option Two or Option Five before you will be able to do this option.
1. 開啟 Setting , 選取 Privacy 選項
2. Turn On or Off Location Services for your Account and Apps
此時, 你也可以將頁面卷軸往下, 看到許多安裝在此台電腦或機台上的app, 針對每個app 去設定 ON / OFF
Option Four: To Turn On or Off Location Service for your Account and Apps using a REG file
Note: The .reg files below will modify the string value and DWORD in the registry keys below.
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}
Value sting value
Deny = Off
Allow = On
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Permissions\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}
SensorPermissionState DWORD
0 = Off
1 = On
1. Turn ON - 你的.reg 內容
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}]
"Value"="Allow"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Permissions\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}]
"SensorPermissionState"=dword:00000001
2. Turn OFF - 你的 .reg 內容
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}]
"Value"="Deny"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Permissions\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}]
"SensorPermissionState"=dword:00000000
Option Five: To Turn On or Off Location for this Device using a REG file
Note: The .reg files below will modify the DWORD value in the registry key below.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration
Status DWORD
0 = Off
1 = On
1. Turn ON - 你的.reg 內容
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration]
"Status"=dword:00000001
2. Turn OFF - 你的 .reg 內容
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration]
"Status"=dword:00000000
留言列表