Skip to content

fix: guard newUsers.ps1 against re-run after profile reset - #1644

Merged
TheyCreeper merged 7 commits into
Atlas-OS:new-updatefrom
Stensel8:fix/new-user-profile-reset-rerun
May 2, 2026
Merged

fix: guard newUsers.ps1 against re-run after profile reset#1644
TheyCreeper merged 7 commits into
Atlas-OS:new-updatefrom
Stensel8:fix/new-user-profile-reset-rerun

Conversation

@Stensel8

@Stensel8 Stensel8 commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

On Windows 11 24H2/25H2, a sleep/wake cycle can cause Windows to recreate an existing user profile from the Default user template, re-triggering the RunOnce entry and running newUsers.ps1 again, forcing a logoff and wiping the user's settings (fixes #1607).

Write a SID marker to HKLM\SOFTWARE\AtlasOS\UserSetup after setup completes. On re-entry, exit immediately if the SID is already marked.

On Windows 11 24H2/25H2, a sleep/wake cycle can cause Windows to
recreate an existing user profile from the Default user template,
re-triggering the RunOnce entry and running newUsers.ps1 again.

Write a SID marker to HKLM after setup completes. On re-entry,
exit immediately if the SID is already marked.
@RadNotRed
RadNotRed requested a review from TheyCreeper April 27, 2026 22:15
Resolves merge conflict in src/playbook/Executables/AtlasModules/Scripts/newUsers.ps1
by keeping the PR branch version which includes all upstream changes plus the
per-SID guard additions to prevent re-running after a Windows profile reset.
@Stensel8
Stensel8 force-pushed the fix/new-user-profile-reset-rerun branch from 0a34b14 to 9fbc728 Compare April 30, 2026 18:05

@TheyCreeper TheyCreeper left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@TheyCreeper
TheyCreeper merged commit a41d808 into Atlas-OS:new-update May 2, 2026
2 checks passed
@Stensel8
Stensel8 deleted the fix/new-user-profile-reset-rerun branch May 8, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

playbook Playbook related issues/PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants