1

I'm having an issue with the command line command; runas. As per this question, regardless of what switches I use with this command as the linked question I continuously get prompted for the Administration password that works successfully when not used in conjunction with the runas command. Otherwise when using the runas command and prompted for an Administration password, it doesn't work.

This is not a matter that I'm using the command or it's associated switches incorrectly, rather why I could enter in the administrator password a dozen times, not that entering a dozen times changes anything but that it will not execute the desired program as an administrator when run within a standard user account. As I simple example;

runas /user:Christoher-PC/Christopher_Admin cmd.exe

The first Christoher-PC is the name of the computer, the second is the name of the Administrator account. In other words, if I right click on the command prompt window, I will be asked for the administrator password, I enter in that password and command prompt is run as an elevated mode, that mode being an administrator.

Although running runas for a program short-cut in the Target field of the short cuts properties the administrator password does not work ?

2
  • 1
    The syntax uses an anti-slash : runas /user:Christoher-PC\Christopher_Admin cmd.
    – harrymc
    Commented Jun 13, 2023 at 11:29
  • Thanks, it works.
    – user531729
    Commented Jun 13, 2023 at 19:30

1 Answer 1

0

The syntax to use is with an anti-slash :

runas /user:Christoher-PC\Christopher_Admin cmd

You must log in to answer this question.