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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling an EXE & passing a variable from VBScript

Status
Not open for further replies.

DrDrew

Programmer
Jun 24, 2002
8
US
I have been using the following VBScript code (in an ASP page) to call an executable in a shell that I built using VB:

Const WindowNorm = 1
Const WindowMin = 2
Const WindowMax = 3
Const WaitonRet = True
Const NoWaitOnRet = False

Dim WshShell

Set WshShell = CreateObject("Wscript.Shell")

WshShell.Run "D:\ICIPilotDevelopment\ICI_Exit.exe", WindowMin

Set WshShell = Nothing
-----------------

I am not sure if it is possible, but I wanted to pass a VBScript variable to the executable and I wasnt sure how to do that or if it can even be done using the method I have shown above. Any comments on how to do this (or telling me Im crazy for thinking I can do this)?
 
try this...

strArg = "your argument"
strFile = "your exe"

WshShell.Run strFile + strArg

--Lopa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top