A tiny Windows launcher that opens a command prompt (cmd.exe) running as
TrustedInstaller — the highest-privileged account in Windows, above both
Administrator and SYSTEM. Handy for editing protected files, registry keys, and
services that even an administrator cannot touch.
Under the hood it wraps NirSoft's
AdvancedRun (/RunAs 8 =
TrustedInstaller) and ships in two flavours: a native Go build (recommended)
and a Python build.
⚠️ Use responsibly. This tool gives you full control over your system. It requires administrator rights and triggers a UAC prompt on launch. Run it only on machines you own — a mistake made as TrustedInstaller can break Windows.
- Relaunches itself elevated (UAC) if not already running as administrator.
- Extracts the bundled
AdvancedRun.exeto a temporary folder. - Runs
AdvancedRun.exe /EXEFilename cmd.exe /RunAs 8 /Run. - Cleans up the temporary folder.
Run whoami in the new console to confirm the account.
- Windows x64 (tested on Windows 10/11).
- Administrator rights — the app self-elevates via UAC.
Run go/RunAsTrustedInstaller.exe, accept the UAC prompt, and a TrustedInstaller
console appears. The binary is unsigned, so Windows SmartScreen may warn on first
run.
Produces a single self-contained .exe with no runtime dependencies.
Prerequisite: Go 1.23+.
cd go
.\build.ps1A pre-generated resource.syso (icon, version info, UAC manifest) is committed,
so a plain build also works:
cd go
go build -ldflags="-s -w -H=windowsgui" -o RunAsTrustedInstaller.exeTo regenerate resource.syso after changing versioninfo.json, icon.ico, or
runas.manifest, install
goversioninfo
(go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest);
build.ps1 runs it automatically when present.
Prerequisites: Python 3.x and PyInstaller (pip install pyinstaller).
cd python
.\build.ps1 # or: pyinstaller runas.specThe output is python/dist/RunAsTrust.exe. UPX compression is applied
automatically if upx is on your PATH; it is optional.
.
├── go/ Native Go implementation (recommended)
├── python/ Python implementation + PyInstaller spec
├── LICENSE MIT license (this project's source code)
└── THIRD-PARTY-NOTICES.md Notices for bundled tools (AdvancedRun, etc.)
The source code in this repository is released under the MIT License. Bundled third-party components keep their own licenses — see THIRD-PARTY-NOTICES.md. NirSoft AdvancedRun is the freeware engine that performs the actual "run as TrustedInstaller" operation.