Link to home
Start Free TrialLog in
Avatar of ajdratch
ajdratch

asked on

psexec error system cannot find the file specified

I need to run a program on a local computer using a batch file. I need to runas a different user and I need to save the password. Since runas does not let you save the password I am trying psexec. For some reason, no matter what I try I get the error"The system cannot find the file specified."

The program is in c:\windows\system32. I copied psexec into that folder and ran

psexec ProgramName.exe

psexec c:\windows\system32\ProgramName.exe

psexec \\LocalComputerName c:\windows\system32\ProgramName.exe

I still get the message that the file is not found

I am an administrator and for testing purposes, I am using my credentials.
ASKER CERTIFIED SOLUTION
Avatar of Anuroopsundd
Anuroopsundd
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ajdratch
ajdratch

ASKER

Using localhost instead of computer name worked. Not sure why but it did