?
Solved

psexec error system cannot find the file specified

Posted on 2012-04-09
2
Medium Priority
?
3,015 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
Viewers will learn how to use the Hootsuite Dashboard.

764 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