Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to execute a file on a share but I need to use a domain account to access it. I've tried runas /user:domain\user \\someshare\foo.exe. It prompts for the domain account's password, which I enter, but then I get "RUNAS ERROR: Unable to run... 2: The system cannot find the file specified." Is this possible with runas? Is there another way to accomplish this from command line?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Network connections are per-session and aren't carried over by runas.

You need to runas /u:domain\user cmd first.

share|improve this answer

If you only need to use the admin account to access the file, have you tried using the /netonly switch?

share|improve this answer

You'll need to map the drive. Use NET USE to do this and then use runas to the drive letter you assign, like

net use z: \\someshare
share|improve this answer
    
I'm still getting the same error. –  Steven May 18 '11 at 19:16
    
@Steven Try this then, Browse to the program and Shift Right Click on the program and click Run as different user then enter your credentials. –  Jeff F. May 18 '11 at 19:31
    
I can't browse to the program as the current user because the current user is not a domain account and therefore does not have access to it. –  Steven May 19 '11 at 17:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.