RunAsSystem
2026.10.9.1
Two run modes are available:
- Session 0 (default): A one-time Scheduled Task runs the installer as SYSTEM in session 0 with no desktop,
exactly like the ConfigMgr client and the Intune Management Extension. No PsExec required.
- Interactive
Two run modes are available:
- Session 0 (default): A one-time Scheduled Task runs the installer as SYSTEM in session 0 with no desktop,
exactly like the ConfigMgr client and the Intune Management Extension. No PsExec required.
- Interactive (PsExec): Runs the installer as SYSTEM on your desktop, so any installer UI is visible.
PsExec is downloaded from live.sysinternals.com into the installer's folder if it isn't already available.
The exit code is reported when the installer finishes, and every run is saved to a history list so it can be re-run.
Installation Options
Owners
Package Details
Author(s)
- Michael Escamilla
Functions
Test-IsAdmin Invoke-RelaunchElevated Get-InstallerType Get-ModeText Get-DefaultLogPath Update-DefaultLogPath Get-ComboBoxTag Set-ComboBoxTag Set-StatusBar Get-FormState Set-FormState Reset-Form Reset-FormOptions Get-CommandSpec Get-PsExecPath Save-PsExec Get-PsExecArguments Update-CommandPreview Update-FileSelection ConvertTo-Int32 Get-ExitCodeInfo Connect-TaskService Register-SystemTask Test-OwnSystemTask Get-SystemTaskStatus Remove-SystemTask Clear-StaleSystemTasks Set-RunningState Set-ResultDisplay Start-SystemRun Watch-SystemRun Get-RunProcessId Stop-SystemRun Complete-SystemRun Protect-HistoryValue Unprotect-HistoryValue Get-History Save-History Add-HistoryEntry Update-HistoryList Import-HistoryEntry Copy-HistoryEntry Update-HistoryButtons Enable-ElevatedDragDrop Start-BackgroundUpdateCheck Show-UpdateAvailable Install-RightClickMenu Uninstall-RightClickMenu
Dependencies
This script has no dependencies.
Release Notes
2026.10.9.1 - Credit Ben Whitmore and his Patch My PC Connectivity tool, which inspired RunAsSystem, in the README and the script help
2026.10.9.0 - Arguments and command lines saved in history are now encrypted with DPAPI, so only your Windows account on that device can read them
History entries show their arguments, with Load and Copy buttons when you hover over an entry
New Current user run mode: runs the installer as the account running the tool, through a scheduled task
New Stop button that ends the running process and anything it started (an MSI install keeps running in Windows Installer)
New Reset button (or Ctrl+R) that puts the window back to how it opens
Keyboard shortcuts: Ctrl+Enter or F5 to run, Ctrl+O to browse, Ctrl+L to load from history, Ctrl+R to reset
The hex exit code is always shown under the decimal code
MSI logs are named after the action, for example Setup.msi.Install.log and Setup.msi.Uninstall.log
Choosing a file of a different type resets the options
The arguments box is now called ArgumentList, wraps long text and grows to about three lines
Sections are grouped into cards, with a new window background colour
Removed the /norestart checkbox (type /norestart in ArgumentList when needed)
2026.10.6.0 - Initial release
FileList
- RunAsSystem.nuspec
- RunAsSystem.ps1
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 2026.10.10.0 | 4 | 10/10/2026 |
| 2026.10.9.1 (current version) | 6 | 10/10/2026 |
| 2026.10.9.0 | 4 | 10/10/2026 |