?
Solved

psexec error system cannot find the file specified

Posted on 2012-04-09
2
Medium Priority
?
3,276 Views
Last Modified: 2012-08-14
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.
0
Comment
Question by:ajdratch
2 Comments
 
LVL 17

Accepted Solution

by:
Anuroopsundd earned 2000 total points
ID: 37823215
first make sure the command is running with administrator permissions

right click cmd and select run as administrator
 try below command then..

c:\windows\system32\psexec \\Localhost "c:\windows\system32\ProgramName.exe"
0
 

Author Closing Comment

by:ajdratch
ID: 37825846
Using localhost instead of computer name worked. Not sure why but it did
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Rules and regulations were devised in order to maintain the integrity of a system. However, interpretation of rules can be quite tricky.
Have you ever run into that annoying problem where the computer won't boot?  Wouldn't it be great if you had a tool that would make that disk boot again?  I have found one tool that works more often than not ...
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question