Skip to content

refactor: replace deprecated reg/sc/wmic/setx/schtasks with PowerShell cmdlets - #1648

Merged
RadNotRed merged 4 commits into
Atlas-OS:new-updatefrom
Stensel8:deprecation-removals
Apr 30, 2026
Merged

refactor: replace deprecated reg/sc/wmic/setx/schtasks with PowerShell cmdlets#1648
RadNotRed merged 4 commits into
Atlas-OS:new-updatefrom
Stensel8:deprecation-removals

Conversation

@Stensel8

@Stensel8 Stensel8 commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Replaces deprecated shell invocations with native PowerShell equivalents across the AtlasModules scripts, and adds PSScriptAnalyzer to CI.

Changes:

  • reg.exe add/deleteSet-ItemProperty / Remove-ItemProperty / Remove-Item
  • sc.exe config start=Set-Service -StartupType
  • Get-WmiObjectGet-CimInstance
  • setx[Environment]::SetEnvironmentVariable
  • schtasks /Change /DisableDisable-ScheduledTask
  • -EA alias → -ErrorAction
  • Delete-UserChoiceKeyRemove-UserChoiceKey (unapproved verb)
  • Fixed empty catch blocks and unused variables
  • Added inline comments throughout
  • Added PSScriptAnalyzer lint workflow

@github-actions github-actions Bot added playbook Playbook related issues/PRs actions GitHub Actions related issues or PRs labels Apr 28, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe use a preconfigured action for this, but this one seems unmaintained so I'm not sure.
https://github.com/marketplace/actions/run-psscriptanalyzer

The current method with the actions/checkout works fine though. It lints files correctly when ran on my fork.

@RadNotRed
RadNotRed merged commit eaadb64 into Atlas-OS:new-update Apr 30, 2026
2 checks passed
@RadNotRed

Copy link
Copy Markdown
Member

thank you!

@Stensel8
Stensel8 deleted the deprecation-removals branch April 30, 2026 01:24
@Stensel8

Copy link
Copy Markdown
Contributor Author

thank you!

And thank you guys for the amazing project and actually making Windows the way it should've been in the first place! Haha

@pencilnav
pencilnav removed the request for review from Xyueta April 30, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

actions GitHub Actions related issues or PRs playbook Playbook related issues/PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants