Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Commit 241c2b3

Browse files
committed
Move DisableSensors to privacy tweaks, Remove old "DisableLocationTracking"
1 parent cd845fa commit 241c2b3

File tree

2 files changed

+29
-52
lines changed

2 files changed

+29
-52
lines changed

Default.preset

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ DisableWebSearch # EnableWebSearch
1616
DisableAppSuggestions # EnableAppSuggestions
1717
DisableActivityHistory # EnableActivityHistory
1818
DisableBackgroundApps # EnableBackgroundApps
19+
# DisableSensors # EnableSensors
1920
DisableLocation # EnableLocation
20-
DisableLocationTracking # EnableLocationTracking
2121
DisableMapUpdates # EnableMapUpdates
2222
DisableFeedback # EnableFeedback
2323
DisableTailoredExperiences # EnableTailoredExperiences
@@ -96,7 +96,6 @@ DisableLockScreen # EnableLockScreen
9696
# DisableLockScreenRS1 # EnableLockScreenRS1
9797
HideNetworkFromLockScreen # ShowNetworkOnLockScreen
9898
HideShutdownFromLockScreen # ShowShutdownOnLockScreen
99-
# DisableSensors # EnableSensors
10099
DisableLockScreenBlur # EnableLockScreenBlur
101100
# DisableAeroShake # EnableAeroShake
102101
DisableAccessibilityKeys # EnableAccessibilityKeys
@@ -184,8 +183,8 @@ DisableAdobeFlash # EnableAdobeFlash
184183
DisableEdgePreload # EnableEdgePreload
185184
DisableEdgeShortcutCreation # EnableEdgeShortcutCreation
186185
DisableIEFirstRun # EnableIEFirstRun
187-
DisableMediaSharing # EnableMediaSharing
188186
DisableFirstLogonAnimation # EnableFirstLogonAnimation
187+
DisableMediaSharing # EnableMediaSharing
189188
# UninstallMediaPlayer # InstallMediaPlayer
190189
# UninstallInternetExplorer # InstallInternetExplorer
191190
# UninstallWorkFolders # InstallWorkFolders

Win10.psm1

Lines changed: 27 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,21 @@ Function EnableBackgroundApps {
206206
}
207207
}
208208

209+
# Disable sensor features, such as screen auto rotation
210+
Function DisableSensors {
211+
Write-Output "Disabling sensors..."
212+
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors")) {
213+
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Force | Out-Null
214+
}
215+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableSensors" -Type DWord -Value 1
216+
}
217+
218+
# Enable sensor features
219+
Function EnableSensors {
220+
Write-Output "Enabling sensors..."
221+
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableSensors" -ErrorAction SilentlyContinue
222+
}
223+
209224
# Disable location feature and scripting for the location feature
210225
Function DisableLocation {
211226
Write-Output "Disabling location services..."
@@ -223,28 +238,6 @@ Function EnableLocation {
223238
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableLocationScripting" -ErrorAction SilentlyContinue
224239
}
225240

226-
# Disable Location Tracking
227-
Function DisableLocationTracking {
228-
Write-Output "Disabling Location Tracking..."
229-
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location")) {
230-
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Force | Out-Null
231-
}
232-
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Name "Value" -Type String -Value "Deny"
233-
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" -Name "SensorPermissionState" -Type DWord -Value 0
234-
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" -Name "Status" -Type DWord -Value 0
235-
}
236-
237-
# Enable Location Tracking
238-
Function EnableLocationTracking {
239-
Write-Output "Enabling Location Tracking..."
240-
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location")) {
241-
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Force | Out-Null
242-
}
243-
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Name "Value" -Type String -Value "Allow"
244-
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" -Name "SensorPermissionState" -Type DWord -Value 1
245-
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" -Name "Status" -Type DWord -Value 1
246-
}
247-
248241
# Disable automatic Maps updates
249242
Function DisableMapUpdates {
250243
Write-Output "Disabling automatic Maps updates..."
@@ -1437,21 +1430,6 @@ Function ShowShutdownOnLockScreen {
14371430
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ShutdownWithoutLogon" -Type DWord -Value 1
14381431
}
14391432

1440-
# Disable sensor features, such as screen auto rotation
1441-
Function DisableSensors {
1442-
Write-Output "Disabling sensors..."
1443-
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors")) {
1444-
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Force | Out-Null
1445-
}
1446-
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableSensors" -Type DWord -Value 1
1447-
}
1448-
1449-
# Enable sensor features
1450-
Function EnableSensors {
1451-
Write-Output "Enabling sensors..."
1452-
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableSensors" -ErrorAction SilentlyContinue
1453-
}
1454-
14551433
# Disable Lock screen Blur - Applicable since 1903
14561434
Function DisableLockScreenBlur {
14571435
Write-Output "Disabling Lock screen Blur..."
@@ -3051,6 +3029,18 @@ Function EnableIEFirstRun {
30513029
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Internet Explorer\Main" -Name "DisableFirstRunCustomize" -ErrorAction SilentlyContinue
30523030
}
30533031

3032+
# Disable "Hi!" First Logon Animation (it will be replaced by "Preparing Windows" message)
3033+
Function DisableFirstLogonAnimation {
3034+
Write-Output "Disabling First Logon Animation..."
3035+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableFirstLogonAnimation" -Type DWord -Value 0
3036+
}
3037+
3038+
# Enable "Hi!" First Logon Animation
3039+
Function EnableFirstLogonAnimation {
3040+
Write-Output "Enabling First Logon Animation..."
3041+
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableFirstLogonAnimation" -ErrorAction SilentlyContinue
3042+
}
3043+
30543044
# Disable Windows Media Player's media sharing feature
30553045
Function DisableMediaSharing {
30563046
Write-Output "Disabling media sharing..."
@@ -3066,18 +3056,6 @@ Function EnableMediaSharing {
30663056
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer" -Name "PreventLibrarySharing" -ErrorAction SilentlyContinue
30673057
}
30683058

3069-
# Disable "Hi!" First Logon Animation (it will be replaced by "Preparing Windows" message)
3070-
Function DisableFirstLogonAnimation {
3071-
Write-Output "Disabling First Logon Animation..."
3072-
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableFirstLogonAnimation" -Type DWord -Value 0
3073-
}
3074-
3075-
# Enable "Hi!" First Logon Animation
3076-
Function EnableFirstLogonAnimation {
3077-
Write-Output "Enabling First Logon Animation..."
3078-
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableFirstLogonAnimation" -ErrorAction SilentlyContinue
3079-
}
3080-
30813059
# Uninstall Windows Media Player
30823060
Function UninstallMediaPlayer {
30833061
Write-Output "Uninstalling Windows Media Player..."

0 commit comments

Comments
 (0)