Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run executable from share 1

Status
Not open for further replies.

brian32

Vendor
Mar 20, 2005
35
US
Hi. How do I run an executable from a share? For example, the file is located at \\server\share\file.exe

I tried wshShell.Run "cmd /c dir \\server\share\file.exe", but that doesn't seem to work.

If there are two ways of accomplishing this, that would help. Thanks.
 
In short, you should be able to simply use:

wshShell.Run "\\server\share\file.exe"

If you want your script to wait then you can try this:

wshShell.Run "\\server\share\file.exe", 0, True


--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top