runas: Command or Program: Run as other user

RunAs allows to run certain programs or commands as another user. For example, should a computer be logged in as a normal user and should elevated privileges be required for certain actions, such as installing software, "RunAs" can be used to simply run the installation as an administrator user.

Windows dialog: Run as other user

By holding the Shift key and additionally "right-clicking" on a shortcut, an extended dialog with the option: "Run as other user" can be called:

After entering the login information, the application will be started with another user:

Command Prompt

With the following command in the command prompt, a new cmd window (command prompt) can be started as another user:

runas /user:DomainOrComputername\Username "cmd"

Control in the command prompt: whoami

The command "whoami" in the command prompt, prints as response the currently used user:


as system

For example, psexec allows commands to be run as "system", see: Localsystem: use local system account - more rights

positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

Publication: 2022-11-25 from Bernhard | Übersetzung Deutsch |🔔 | Comments:0

Windows 10/11: automatic login | Autologon - Autologin | Windows | Localsystem: use local system account - more rights

Top articles in this section

Windows : create a missing recovery partition

When cloning a large hard disk to a smaller one, I lost the recovery partition. So far not bad, Windows works without recovery partition, but in case of an error the partition helps to get the PC up and running again. To summarize, here's how it works with the recovery partition: As long as the partition is still there, it can be deactivated and written to a file. If the partition gets lost unexpectedly, it can be recovered from the Windows setup media. This post is also available as a video, se...

the 4 best tools to compare two text files

Anyone who frequently creates scripts or analyzes log files and handles different versions can compare them very quickly with the help of the right editor. 

install driver via command line cmd: inf

Windows drivers can of course also be managed via the command line. Microsoft offers two different tools for this purpose: The PnPUtil integrated in Windows and as part of the Windows Driver Kit (WDK) the command: devcon.

Questions / Comments

By continuing to browse the site, you agree to our use of cookies. More Details