Solved

psexec error system cannot find the file specified

Posted on 2012-04-09
2
2,667 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 500 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dropbox 3 88
Free Alternative to JIRA 4 113
Ransomware attacks 5 109
best free software for ripping cd's 11 176
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
This video shows how use content aware, what it’s used for, and when to use it over other tools.
Viewers will learn how to use the Hootsuite Dashboard.

839 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