Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mspaintmsi/superuser

A simple and lightweight utility for starting any process with TrustedInstaller privileges.
https://github.com/mspaintmsi/superuser

administration tool trustedinstaller utility windows windows-10 windows-7 windows-8 windows-8-1 windows-vista

Last synced: 6 days ago
JSON representation

A simple and lightweight utility for starting any process with TrustedInstaller privileges.

Awesome Lists containing this project

README

        

# About
_superUser_ is a simple and lightweight utility to start any process as the System user with Trusted Installer privileges.

Supported operating systems: Windows 11, 10, 8.1, 8, 7, Vista.

# How It Works
The program acquires the TrustedInstaller process' access token and creates a new (user-specified) process as the System user with Trusted Installer privileges using this token.

# Usage
There are two ways to run the program:

## From the File Explorer
Double-click the executable, grant administrator privileges and wait for a command prompt to appear.

## From the Command Prompt
Run _superUser_ from the command prompt opened __as administrator__, using the following arguments:

__`superUser [options] [command_to_run]`__

`command_to_run` is the command line used to create the new process. It is a filename followed by arguments. If not specified, `cmd.exe` is started.

This filename can be:
- An executable name (the _.exe_ extension can be omitted).
- A batch name (_.cmd_ or _.bat_).

### Options

| Option | Meaning |
|:------:|-------------------------------------------------------------|
| /h | Display the help message. |
| /m | Minimize the created window. |
| /s | The child process shares the parent's console. Requires /w. |
| /v | Display verbose messages with progress information. |
| /w | Wait for the child process to finish. Used for scripts.
Returns the exit code of the child process. |

- You can also use a dash (-) in place of a slash (/) in front of an option.
- Multiple options can be grouped together (e.g., `/ws` which is equivalent to `/w /s`).

### Notes

The `/ws` options allow you to run a process in a completely transparent way:

- The new process runs in the same window and performs its inputs and outputs there.
- The exit code of the new process is returned and you can retrieve it with the errorlevel variable.

### Examples

Open a command prompt __as administrator__ to run these commands.

superUser64 /ws whoami /user
superUser64 /ws whoami /groups | find "TrustedInstaller"
superUser64 /w my_script.cmd arg1 arg2

## Exit Codes

| Exit Code | Meaning |
|:---------:|--------------------------------------------------------|
| 1 | Invalid argument. |
| 2 | Failed to acquire SeDebugPrivilege. |
| 3 | Failed to open/start TrustedInstaller process/service. |
| 4 | Process creation failed (prints error code). |
| 5 | Another fatal error occurred. |

If the `/w` option is specified, the exit code of the child process is returned.
If _superUser_ fails, it returns a code from -1000001 to -1000005 (e.g., -1000002 instead of 2).