Skip to content

Commit

Permalink
feat(general conf): location scripts (issue #1127)
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Jul 14, 2024
1 parent cef5ab8 commit b2ece49
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/playbook/Configuration/atlas/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ actions:
exeDir: true
wait: true

- !writeStatus: {status: 'Disabling Location'}
- !cmd:
command: '"AtlasDesktop\3. General Configuration\Location\Disable Location (default).cmd" /silent'
exeDir: true
wait: true

##############################################################################################
## SERVICES ##
##############################################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ actions:
- !registryValue:
path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer'
value: 'SettingsPageVisibility'
data: 'hide:recovery;maps;maps-downloadmaps;findmydevice;privacy;privacy-speechtyping;privacy-speech;privacy-feedback;privacy-activityhistory;search-permissions;privacy-location;privacy-general;sync;cortana-windowssearch;mobile-devices;mobile-devices-addphone;workplace;backup'
data: 'hide:recovery;maps;maps-downloadmaps;findmydevice;privacy;privacy-speechtyping;privacy-speech;privacy-feedback;privacy-activityhistory;search-permissions;privacy-general;sync;cortana-windowssearch;mobile-devices;mobile-devices-addphone;workplace;backup'
type: REG_SZ
builds: [ '<22000' ]

# Windows 11
- !registryValue:
path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer'
value: 'SettingsPageVisibility'
data: 'hide:recovery;maps;maps-downloadmaps;findmydevice;privacy;privacy-feedback;privacy-activityhistory;search-permissions;privacy-location;privacy-general;sync;cortana-windowssearch;mobile-devices;mobile-devices-addphone;workplace;family-group;deviceusage;home'
data: 'hide:recovery;maps;maps-downloadmaps;findmydevice;privacy;privacy-feedback;privacy-activityhistory;search-permissions;privacy-general;sync;cortana-windowssearch;mobile-devices;mobile-devices-addphone;workplace;family-group;deviceusage;home'
type: REG_SZ
builds: [ '>=22000' ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@echo off

if "%~1"=="/silent" goto :main

set "___args="%~f0" %*"
fltmc > nul 2>&1 || (
echo Administrator privileges are required.
powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || (
echo You must run this script as admin.
if "%*"=="" pause
exit /b 1
)
exit /b
)

:main
(
sc config lfsvc start=disabled
sc config MapsBroker start=disabled
) > nul

(
sc stop lfsvc
sc stop MapsBroker
taskkill /f /im SystemSettings.exe
) > nul 2>&1

"%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide privacy-location

if "%~1"=="/silent" exit /b

echo Finished, please reboot your device for changes to apply.
pause
exit /b
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@echo off

if "%~1"=="/silent" goto :main

set "___args="%~f0" %*"
fltmc > nul 2>&1 || (
echo Administrator privileges are required.
powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || (
echo You must run this script as admin.
if "%*"=="" pause
exit /b 1
)
exit /b
)

:main
(
sc config lfsvc start=demand
sc config MapsBroker start=auto
) > nul

(
sc start lfsvc
sc start MapsBroker
taskkill /f /im SystemSettings.exe
) > nul 2>&1

"%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide privacy-location

if "%~1"=="/silent" exit /b

echo Finished, please reboot your device for changes to apply.
pause
exit /b

0 comments on commit b2ece49

Please sign in to comment.