Skip to content

Marak123/RunAS-TrustedInstaller-for-Windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RunAs TrustedInstaller for Windows

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.

How it works

  1. Relaunches itself elevated (UAC) if not already running as administrator.
  2. Extracts the bundled AdvancedRun.exe to a temporary folder.
  3. Runs AdvancedRun.exe /EXEFilename cmd.exe /RunAs 8 /Run.
  4. Cleans up the temporary folder.

Run whoami in the new console to confirm the account.

Requirements

  • Windows x64 (tested on Windows 10/11).
  • Administrator rights — the app self-elevates via UAC.

Usage

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.

Build from source

Go (recommended)

Produces a single self-contained .exe with no runtime dependencies. Prerequisite: Go 1.23+.

cd go
.\build.ps1

A 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.exe

To 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.

Python

Prerequisites: Python 3.x and PyInstaller (pip install pyinstaller).

cd python
.\build.ps1        # or: pyinstaller runas.spec

The output is python/dist/RunAsTrust.exe. UPX compression is applied automatically if upx is on your PATH; it is optional.

Project structure

.
├── 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.)

License

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.

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

Used by

Contributors

Languages