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:
c:\temp>whoami
Domain\Username
as system
For example, psexec allows commands to be run as "system", see: Localsystem: use local system account - more rights

{{percentage}} % positive

THANK YOU for your review!
Top articles in this section
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...
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.
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.