Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

psexec error system cannot find the file specified

Posted on 2012-04-09
2
Medium Priority
?
3,171 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

The main intent of this article is to make you aware of ‘Exchange fail to mount’ error, its effects, causes, and solution.
If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
This video will demonstrate how to find the puppet warp tool from the edit menu and where to put the points to edit.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

610 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