Hello Reprobus,
Thank you for your question and for reaching out with your question today.
The `runas` command is used to run a program or command with different user credentials, including administrator privileges. However, there are a few factors that can affect its functionality. Here are some things to consider:
1. User Account Control (UAC): If User Account Control is enabled on your system, even if you provide the correct administrator password, the `runas` command may fail due to UAC restrictions. In such cases, you can try running the command prompt or the program directly with administrative privileges by right-clicking and selecting "Run as administrator."
2. User Account and Password: Ensure that you are providing the correct user account and password when using the `runas` command. Double-check the username and make sure you have the right password for the specified administrator account. Remember that the username should include the domain or computer name if applicable.
3. Local Security Policies: The behavior of the `runas` command can also be affected by local security policies or group policies set on your system. Check if there are any policies in place that restrict the use of `runas` or modify the behavior of UAC.
4. Alternative Approaches: Instead of using the `runas` command, you can also try other methods to run a program as an administrator, such as:
- Right-clicking on the program or shortcut and selecting "Run as administrator."
- Using the built-in "Administrator" account directly (if enabled and accessible).
- Modifying the shortcut properties to always run the program as an administrator.
I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.
If the reply was helpful, please don’t forget to upvote or accept as answer.
Best regards.
Runas Command issues with Accounts
I've been trying numerous times to get the runas command to work as an Administrator in a standard account. First I've tried the following command; runas /user:Christopher-Admin\Christoher-PC /savecred "C:\Program Files\Microsoft VS Code\Code.exe"
Although the above didn't work, I tried simply attempting to run regedit using runas as an Administrator in both cases when I'm asked for the Administrator password, and I enter in the Administrator password I get an error it's the wrong password or user name ?
In any other case I can enter the administrator password to run the command prompt as an administrator or even registry edit and it works ?
Windows for business | Windows Client for IT Pros | User experience | Other
1 answer
Sort by: Most helpful
-
Limitless Technology 44,766 Reputation points
2023-06-09T12:07:05.92+00:00