PDA

View Full Version : Call/Run an exe file in vbs (W2K)



xyang
02-20-2003, 01:50 PM
I'm trying to call an .exe file with parameters that would make the .exe file run in silent mode, send one output file to a folder on a mapped server, and another output file to a different folder on the same mapped server.
Heres my line for this situation:
Set wshshell = WScript.CreateObject ("WScript.shell")
wshshell.Run ("%comspec% C:\CheckIDE\CheckIDE.exe -i off -c Y: -d U:"), 1, true

The script seems to run perfectly, but when I look at the mapped drives where the .exe file was suppose to dump two files, there is nothing.

I tested the .exe file on the cmd prompt and it does work with those parameters even dumping to the right mapped drives. Here's what i used in the cmd prompt:
C:\CheckIDE\CheckIDE.exe -i off -c Y: -d U:

Im not sure why it would work in the cmd prompt and not work in the script when im calling up the cmd prompt in the script.

Any help/suggestions would be gladly welcome.

dudeinAmerica
02-24-2003, 04:04 PM
So you're wanting to execute the command <font color=green>C:\CheckIDE\CheckIDE.exe -i off -c Y: -d U: </font color=green> while making it hidden. If I'm understanding you correctly then all you have to do is <font color=green>Shell "C:\CheckIDE\CheckIDE.exe -i off -c Y: -d U: ",VbHide</font color=green>

Tell me if this works for you,
/images/forums/icons/cool.gifBrady/images/forums/icons/cool.gif