13 June,2025 by Rambler
Question: When attempting to execute a Windows command line command , "start.exe" with a RUNAS command - I'm getting a "The system cannot find the fike specified" error. But if I run it with the profile which I'm logged into the server , the same command runs ok.
C:\myfolder>runas /user:MYDOMAIN\USER1 "start cmd.exe"
Enter the password for MYDOMAIN\USER1 :
Attempting to start start cmd.exe as user "MYDOMAIN\USER1" ...
RUNAS ERROR: Unable to run - start cmd.exe
2: The system cannot find the file specified.
Answer:
The command you're executing interprets this as looking for a for a file named start as the command. Runas doesn't know that start is internal to cmd
Do:
runas /user:MYDOMAIN\USER1 "cmd start cmd.exe"
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |