Sysinternals Homepage
Forum Home Forum Home > Sysinternals Utilities > PsTools
  New Posts New Posts RSS Feed - psexec "system cannot find the file specified"
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

psexec "system cannot find the file specified"

 Post Reply Post Reply
Author
Message
uhpctech View Drop Down
Newbie
Newbie
Avatar

Joined: 12 July 2007
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote uhpctech Quote  Post ReplyReply Direct Link To This Post Topic: psexec "system cannot find the file specified"
    Posted: 12 July 2007 at 1:14pm
I am having a problem using psexec.  I am trying to run a vb script from a network location to my computer (will eventually copy to other computers). 
The syntax is
 
psexec @computerlist.txt -u domain\username -c \\uhs202\files\applications\onbse5client\obcheckresolutions.vbs
 
It returns "psexec could not start obcheckresolutions.vbs on (computer name in computerlist.txt).  The system cannot find the file specified."
 
A couple months ago we got psexec to work for something else.  The only difference is that file was a .bat instead of .vbs.
 
Any suggestions?
Thanks!
Back to Top
Karlchen View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 June 2005
Location: Germany
Status: Offline
Points: 5131
Post Options Post Options   Thanks (0) Thanks(0)   Quote Karlchen Quote  Post ReplyReply Direct Link To This Post Posted: 12 July 2007 at 2:55pm
Hi, Eric.

The error message
Quote The system cannot find the file specified.
leads me to ask the question: Are you sure that the UNC folder \\uhs202\files\applications\onbse5client\ will be accessible from each computer inside your computerlist.txt?

If the answer is yes, then I suggest you try your command like this:
psexec @computerlist.txt -u domain\username cscript.exe //B \\uhs202\files\applications\onbse5client\obcheckresolutions.vbs


I.e. drop the -c for the moment and instead explicitly tell the remote Windows systems to use cscript.exe to interprete the VBS script. instead.

Kindly let us know if this commandline works for you.

Karl
--
Oops, misspelt my own name, forgot the "l". - How embarrassing. - "l" added.

Edited by Karlchen - 13 July 2007 at 3:33pm
Back to Top
uhpctech View Drop Down
Newbie
Newbie
Avatar

Joined: 12 July 2007
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote uhpctech Quote  Post ReplyReply Direct Link To This Post Posted: 13 July 2007 at 1:29pm
Hi Kar,
IT WORKED!!!!  Thanks for your help!!
 
Quick question for you.  The "//B" part of the command line, what does that do?  Also, related to the cscript.exe variable, is there a list of these .exe's somewhere?
 
Thanks again for the help.
Eric
Back to Top
Karlchen View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 June 2005
Location: Germany
Status: Offline
Points: 5131
Post Options Post Options   Thanks (0) Thanks(0)   Quote Karlchen Quote  Post ReplyReply Direct Link To This Post Posted: 13 July 2007 at 3:26pm
Hello, Eric.

Glad to learn my advice proved to useful and your issue has been solved.

On your question about "cscript.exe":
Quote The "//B" part of the command line, what does that do?

Answer:
Quote //B     
Specifies batch mode, which does not display alerts, scripting errors, or input prompts.
(cf. the "cscript /?" helpscreen.)

Quote is there a list of these .exe's somewhere?

Get it here: Command-line reference A-Z. (You will find "cscript.exe" here as well.)
And just a footnote: in case you are offline and have not got access to the internet: The Command-line reference A-Z is available on your local disk inside the Windows Help and Support Centre.

Kind regards,
Karl


Edited by Karlchen - 13 July 2007 at 3:29pm
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down