Skip to content

Commit

Permalink
Merge pull request #1077 from Atlas-OS/dev
Browse files Browse the repository at this point in the history
Automatic PR: Merging dev into main (1797068)
  • Loading branch information
Xyueta authored May 22, 2024
2 parents 096cd6e + 9388fa5 commit 2ad0afe
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 26 deletions.
1 change: 1 addition & 0 deletions src/playbook/Configuration/atlas/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ actions:

# ------- Microsoft recommendation - 'No guideance' ------
- !service: {name: 'wercplsupport', operation: change, startup: 4}
- !service: {name: 'UCPD', operation: change, startup: 4}

##############################################################################################
## DRIVERS ##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ actions:
# Updates compatibility database
- !scheduledTask: {path: '\Microsoft\Windows\Application Experience\PcaPatchDbTask', operation: disable}

# UCPD
- !scheduledTask: {path: '\Microsoft\Windows\AppxDeploymentClient\UCPD velocity', operation: disable}

# -------------------------------------------------------------------------------------
# Here are the scheduled tasks that are currently commented as they're under review.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ actions:
# Apply theme file
- !taskKill: {name: 'SystemSettings', ignoreErrors: true}
- !cmd:
command: 'explorer "%windir%\Resources\Themes\atlas-v0.4.x-dark.theme" & ping 127.0.0.1 -n 6'
command: 'explorer "%windir%\Resources\Themes\atlas-v0.4.x-dark.theme" & timeout /t 6 /nobreak > nul'
wait: true
runas: currentUser
timeout: 30

# For Windows 11, set recent theme selection
- !taskKill: {name: 'SystemSettings', ignoreErrors: true}
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;autoplay;usb;maps;maps-downloadmaps;findmydevice;privacy;notifications;privacy-notifications;privacy-speechtyping;privacy-speech;privacy-feedback;privacy-activityhistory;search-permissions;privacy-location;privacy-general;sync;printers;cortana-windowssearch;mobile-devices;mobile-devices-addphone;workplace;backup'
data: 'hide:recovery;autoplay;usb;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'
type: REG_SZ
builds: [ '<22000' ]

# Windows 11
- !registryValue:
path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer'
value: 'SettingsPageVisibility'
data: 'hide:recovery;autoplay;usb;maps;maps-downloadmaps;findmydevice;privacy;notifications;privacy-notifications;privacy-feedback;privacy-activityhistory;search-permissions;privacy-location;privacy-general;sync;printers;cortana-windowssearch;mobile-devices;mobile-devices-addphone;workplace;family-group;deviceusage;home'
data: 'hide:recovery;autoplay;usb;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'
type: REG_SZ
builds: [ '>=22000' ]
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ for %%a in (
"notifications"
"privacy-notifications"
) do (
call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide %%a /silent
call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide %%~a /silent
)

if "%~1"=="/includeuserservice" (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ for %%a in (
"notifications"
"privacy-notifications"
) do (
call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide "%%a" /silent
call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide %%~a /silent
)

if "%~1" == "/silent" exit /b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ echo Disabling services...
call "%windir%\AtlasModules\Scripts\setSvc.cmd" Spooler 4
call "%windir%\AtlasModules\Scripts\setSvc.cmd" PrintWorkFlowUserSvc 4

call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide printing
call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /hide printers

echo Disabling capabilities...
for %%a in (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ echo Enabling services...
call setSvc.cmd Spooler 2
call setSvc.cmd PrintWorkFlowUserSvc 3

call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide printing
call "%windir%\AtlasModules\Scripts\settingsPages.cmd" /unhide printers

echo Enabling capabilities (this might take a while)...
for %%a in (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ echo Enabling News and Interests (called Widgets in Windows 11)...
start explorer.exe
) > nul 2>&1

ping 127.0.0.1 -n 2 > nul
timeout /t 3 /nobreak > nul
taskkill /f /im SystemSettings.exe > nul 2>&1
start ms-settings:taskbar

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo WARNING: This will force enable all security mitigiations for improved secu
echo This will slow down performance, and worsen compatibility. It is
echo recommended to use 'Set Windows Default Mitigations.cmd' instead.
echo]
ping 127.0.0.1 -n 2 > nul
timeout /t 3 /nobreak > nul
echo Press any key to continue anyways...
pause > nul
cls
Expand Down
2 changes: 1 addition & 1 deletion src/playbook/Executables/AtlasModules/Scripts/RunAsTI.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if "%~1" == "" (
set /P program_path="Enter the valid path of the program or drag it here: "
if "!program_path!" == "" (
echo error: no input
ping 127.0.0.1 -n 2 > nul
timeout /t 3 /nobreak > nul
cls
goto RunAsTI-Elevate
)
Expand Down
20 changes: 4 additions & 16 deletions src/playbook/Executables/CLIENTCBS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
# It can be hidden by using SettingsPageVisibility

# Variables
$cbsPublic = "$([Environment]::GetFolderPath('Windows'))\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\Public"
$windir = [Environment]::GetFolderPath('Windows')
$cbsPublic = "$windir\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\Public"
$settingsExtensions = "$cbsPublic\wsxpacks\Account\SettingsExtensions.json"
if (!(Test-Path $settingsExtensions)) {
Write-Output "Settings extensions ($settingsExtensions) not found."
Expand Down Expand Up @@ -39,27 +40,14 @@ $ids = Find-VelocityID -Node $(Get-Content -Path $settingsExtensions | ConvertFr

# No IDs check
if ($ids.Count -le 0) {
Write-Output "No velocity IDs were found, Microsoft might have changed something."
Write-Output "No velocity IDs were found. Exiting."
exit 1
}

# Hide 'Microsoft account' page in Settings that appears
# Not set in the actual YAML in case no velocity IDs were found
# If the velocity IDs aren't set, then the account page disappears
function SettingsPageVisibility {
$policyKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer"
$visbility = "SettingsPageVisibility"
$currentPolicy = (Get-ItemProperty -Path $policyKey -Name $visbility -EA 0).$visbility

if ($currentPolicy -like "showonly:*") {
return "Current $visibilityValue is 'showonly', no need to append."
}

$split = $currentPolicy -replace 'hide:' -split ';' | Where-Object { $_ }
$split += "account"
Set-ItemProperty -Path $policyKey -Name $visbility -Value "hide:$($split -join ';')"
}
SettingsPageVisibility
& "$windir\AtlasModules\Scripts\settingsPages.cmd" /hide account

# Obfuscate velocity IDs
# Rewritten in PowerShell from ViVE
Expand Down

0 comments on commit 2ad0afe

Please sign in to comment.