Skip to content

Commit 3baf2e4

Browse files
committed
refactor: re-write comments which were misleading
1 parent 8c4e2bd commit 3baf2e4

42 files changed

Lines changed: 47 additions & 114 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

playbook/Configuration/atlas/appx.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ actions:
1818
# deprovisioning, cache clearing) lives in the AppxSupport phase
1919
# (AtlasModules\Scripts\Phases\Invoke-AppxSupportPhase.ps1).
2020

21-
#####################################################################################################
22-
2321
# Snapshot current AppX packages to deprovision removed ones afterward and
2422
# kill Teams processes
2523
- !powerShell:
@@ -34,9 +32,9 @@ actions:
3432
# (it must run as the user so Get-AppxPackage sees the user's packages).
3533
- !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications', value: 'ConfigureChatAutoInstall', data: '0', type: REG_DWORD}
3634

37-
# Microsoft Edge (moved from atlas\components.yml; the rest of the Edge removal
38-
# runs in the Components phase, gated on the same option). Legacy EdgeHTML, the
39-
# Chromium Edge AppX and the Game Assist companion.
35+
# Microsoft Edge (the rest of the Edge removal runs in the Components phase,
36+
# gated on the same option). Legacy EdgeHTML, the Chromium Edge AppX and the
37+
# Game Assist companion.
4038
- !appx: {name: 'Microsoft.MicrosoftEdge_8wekyb3d8bbwe', type: family, option: 'uninstall-edge', ignoreErrors: true}
4139
- !appx: {name: 'Microsoft.MicrosoftEdge.Stable_8wekyb3d8bbwe', type: family, option: 'uninstall-edge', ignoreErrors: true}
4240
- !appx: {name: 'Microsoft.Edge.GameAssist*', type: family, option: 'uninstall-edge', ignoreErrors: true}

playbook/Configuration/atlas/components.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ actions:
66
# The component removal logic lives in the Components phase
77
# (AtlasModules\Scripts\Phases\Invoke-ComponentsPhase.ps1): Security Center startup
88
# item, Smart App Control, Microsoft Edge, OneDrive and the CBS component packages.
9-
# Edge's !appx family removal moved to atlas\appx.yml (AME-only action).
9+
# Edge's !appx family removal is in atlas\appx.yml (AME-only action).
1010

1111
- !writeStatus: {status: 'Removing Microsoft Edge', option: 'uninstall-edge'}
1212

playbook/Configuration/atlas/default.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ actions:
1111
runas: currentUserElevated
1212
# Defaults phase (AtlasModules\Scripts\Phases\Invoke-DefaultsPhase.ps1): on upgrades,
1313
# re-applies every recorded toggle whose state is not 0 by re-running its recorded
14-
# launcher silently (Invoke-AtlasToggleReapply, the DEFAULT.ps1 replacement). Fresh
15-
# installs use the DEFAULT.reg import above.
14+
# launcher silently (Invoke-AtlasToggleReapply). Fresh installs use the DEFAULT.reg
15+
# import above.
1616
- !powerShell:
1717
command: '& (Join-Path ([Environment]::GetFolderPath(''Windows'')) ''AtlasModules\Scripts\Invoke-AtlasInstall.ps1'') -Phase Defaults'
1818
onUpgrade: true

playbook/Configuration/tweaks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ actions:
1010
# engine invocation; per-tweak order and enable/disable live in
1111
# Scripts\Tweaks\tweaks.manifest.psd1 (comment a line out to disable it).
1212
#
13-
# Every tweak is now PowerShell - there are no !task includes. Per-user shell COM
13+
# Every tweak is PowerShell - there are no !task includes. Per-user shell COM
1414
# (theme, lock-screen, pin-to-Home) is applied by Initialize-NewUser, never from
1515
# these SYSTEM-context phases: for the installing account it runs below with
1616
# -FromInstall (elevated user session), for new accounts at first logon via RunOnce.

playbook/Executables/AtlasModules/Scripts/Internal/Disable-FileSharing.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Set-StrictMode -Version 3.0
88

99
$fileSharingConfigPath = "$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\3. General Configuration\File Sharing"
1010

11-
# Disable network items
1211
Get-NetAdapterBinding -Name "*" -ComponentID ms_msclient, ms_server, ms_lltdio, ms_rspndr -ErrorAction SilentlyContinue |
1312
Disable-NetAdapterBinding -ErrorAction SilentlyContinue |
1413
Out-Null
@@ -23,10 +22,8 @@ foreach ($interface in $interfaces) {
2322
# Disable NetBIOS service
2423
Set-Service -Name NetBT -StartupType Disabled
2524

26-
# Set network profile to 'Public Network'
2725
Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Public
2826

29-
# Disable network discovery firewall rules
3027
Get-NetFirewallRule | Where-Object {
3128
# File and Printer Sharing, Network Discovery
3229
(

playbook/Executables/AtlasModules/Scripts/Internal/Disable-PowerSaving.ps1

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ WARNING: You are on a laptop, disabling power saving will cause faster battery d
2222
This script will disable many power saving features in Windows for reduced latency and increased performance.
2323
Ensure that you have adequate cooling.`n
2424
"@ -ForegroundColor Cyan
25-
#Pause
2625
}
2726

2827
Write-Host "`nAdding power scheme..." -ForegroundColor Yellow
@@ -53,7 +52,6 @@ powercfg /setacvalueindex scheme_current 7516b95f-f776-4464-8c53-06167f40cc99 3c
5352
## Processor performance time check interval - 200 milliseconds
5453
## Reduces DPCs, can be set all the way to 5000ms for statically clocked systems
5554
powercfg /setacvalueindex scheme_current 54533251-82be-4824-96c1-47b60b740d00 4d2b0152-7d5c-498b-88e2-34345392a2c5 200
56-
# Set the active scheme as the current scheme
5755
powercfg /setactive scheme_current
5856

5957
Write-Host "Disabling power-saving ACPI devices..." -ForegroundColor Yellow
@@ -77,7 +75,6 @@ foreach ($setting in @(
7775
# Wi-Fi capability that saves power consumption
7876
"uAPSDSupport",
7977

80-
# Self-explanatory
8178
"EnablePowerManagement",
8279
"EnableSavePowerNow",
8380
"bLowPowerEnable",
@@ -135,7 +132,4 @@ $powerKey = "HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling"
135132
if (!(Test-Path $powerKey)) { New-Item -Path $powerKey -Force | Out-Null }
136133
New-ItemProperty -Path $powerKey -Name "PowerThrottlingOff" -Value 1 -PropertyType DWORD -Force | Out-Null
137134

138-
#if ($Silent) { exit }
139-
#Read-Pause "`nCompleted.`nPress Enter to exit"
140-
141135
exit

playbook/Executables/AtlasModules/Scripts/Internal/Enable-FileSharing.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Set-StrictMode -Version 3.0
55
$networkDiscoveryConfigPath = "$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\6. Advanced Configuration\Services\Network Discovery"
66
$fileSharingConfigPath = "$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\3. General Configuration\File Sharing"
77

8-
# Enable network items
98
Enable-NetAdapterBinding -Name "*" -ComponentID ms_msclient, ms_server, ms_lltdio, ms_rspndr | Out-Null
109

1110
# Enable Network Discovery services and its dependencies
@@ -23,10 +22,8 @@ Set-Service -Name NetBT -StartupType System
2322

2423
choice /c:yn /n /m "Would you like to change your network profile to 'Private'? [Y/N] "
2524
if ($LASTEXITCODE -eq 1) {
26-
# Set network profile to 'Private Network'
2725
Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private
2826

29-
# Disable network discovery firewall rules
3027
Get-NetFirewallRule | Where-Object {
3128
# File and Printer Sharing, Network Discovery
3229
(

playbook/Executables/AtlasModules/Scripts/Internal/Install-Software.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Thin forwarder kept for ScriptWrappers\Install-Software.ps1 ("Install Software" in the
22
# Atlas folder); the WinGet picker UI lives in the Atlas.Software module
3-
# (Show-AtlasSoftwarePicker). Exits 1 when WinGet is unavailable, as before.
3+
# (Show-AtlasSoftwarePicker). Exits 1 when WinGet is unavailable.
44
$ErrorActionPreference = 'Stop'
55

66
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\Modules\Atlas.Software\Atlas.Software.psd1')

playbook/Executables/AtlasModules/Scripts/Internal/Remove-Edge.ps1

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function DeleteIfExist($Path) {
116116

117117
function Remove-EdgePath {
118118
# Take ownership, grant Administrators full control, then delete - with a cmd 'rd'
119-
# retry for trees the provider can't remove. Port of edge.py's remove_directory.
119+
# retry for trees the provider can't remove.
120120
param([Parameter(Mandatory = $true)][string]$Path)
121121

122122
if (-not (Test-Path -LiteralPath $Path)) {
@@ -131,7 +131,6 @@ function Remove-EdgePath {
131131
}
132132
}
133133

134-
# True if it's installed
135134
function EdgeInstalled {
136135
foreach ($msedgeExe in $msedgeExePaths) {
137136
if (Test-Path $msedgeExe) {
@@ -226,8 +225,8 @@ function DisableEdgeUpdateInfrastructure {
226225
function Remove-EdgeRegistration {
227226
# Edge leaves shell registration behind after its binaries are gone: dead protocol
228227
# handlers (microsoft-edge:), App Paths\msedge.exe, a binary-less Apps-list Uninstall
229-
# row, StartMenuInternet and EdgeUpdate\Clients. Port of edge.py's registry cleanup;
230-
# each key is removed from both the 64- and 32-bit views. WebView2 keys are untouched.
228+
# row, StartMenuInternet and EdgeUpdate\Clients. Each key is removed from both the
229+
# 64- and 32-bit views. WebView2 keys are untouched.
231230
$edgeKeys = @(
232231
'HKLM\SOFTWARE\Microsoft\Edge'
233232
'HKLM\SOFTWARE\Microsoft\EdgeUpdate'
@@ -482,7 +481,7 @@ if ($UninstallEdge) {
482481
# Kick off Edge's own uninstaller detached and DO NOT wait for it. A synchronous
483482
# system-level --force-uninstall runs its RestartManager phase in the live session and
484483
# signs the user out on 24H2/25H2; launching it detached lets the direct file deletion
485-
# below finish the removal first (port of edge.py: Popen + short sleep, then delete).
484+
# below finish the removal first.
486485
foreach ($root in @(
487486
"$([Environment]::GetFolderPath('ProgramFilesx86'))\Microsoft\Edge\Application",
488487
"$([Environment]::GetFolderPath('ProgramFiles'))\Microsoft\Edge\Application"
@@ -514,7 +513,7 @@ if ($UninstallEdge) {
514513

515514
# Remove leftover Edge shortcuts (they now point at deleted binaries and fail to open):
516515
# every user's Desktop, Quick Launch and taskbar pin, plus the Public Desktop and the
517-
# common Start Menu. Port of edge.py's icon cleanup.
516+
# common Start Menu.
518517
$edgeShortcutNames = @('edge.lnk', 'Microsoft Edge.lnk')
519518
$relativeShortcutDirs = @(
520519
'Desktop'

playbook/Executables/AtlasModules/Scripts/Internal/Set-DefaultPowerSaving.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ foreach ($value in @(
4242
Write-Host "Enabling network adapter power saving..." -ForegroundColor Yellow
4343
# Set power saving mode for all network cards to default
4444
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\NDIS\Parameters' -Name "DefaultPnPCapabilities" -Value 0
45-
# Configure network adapter settings
4645
$properties = Get-NetAdapter -Physical | Get-NetAdapterAdvancedProperty
4746
foreach ($setting in @(
4847
# Stands for Ultra Low Power
@@ -58,7 +57,6 @@ foreach ($setting in @(
5857
# Wi-Fi capability that saves power consumption
5958
"uAPSDSupport",
6059

61-
# Self-explanatory
6260
"EnablePowerManagement",
6361
"EnableSavePowerNow",
6462
"bLowPowerEnable",
@@ -85,5 +83,4 @@ Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerThr
8583

8684

8785
if ($Silent) { exit }
88-
# Finish
8986
Read-Pause "`nCompleted.`nPress Enter to exit"

0 commit comments

Comments
 (0)