engg
asked on
running .exe in windows scripting host
Hi,
I have this code to run .exe using Windows scripting host. I am getting this error "The system cant find the file specified."
Is the code right? I am new to WSH. I have run the same exe before and the path is correct. arg1 is the argument that needs to be passed to test.exe. Please help. Thank you.
Dim shell
Dim quote
Dim pgm
Dim arg
set shell = WScript.CreateObject("WScr ipt.Shell" )
quote = Chr(34)
pgm = "C:\test\bin\Debug\test.ex e"
arg = "arg1"
shell.Run quote & pgm & " " & arg
I have this code to run .exe using Windows scripting host. I am getting this error "The system cant find the file specified."
Is the code right? I am new to WSH. I have run the same exe before and the path is correct. arg1 is the argument that needs to be passed to test.exe. Please help. Thank you.
Dim shell
Dim quote
Dim pgm
Dim arg
set shell = WScript.CreateObject("WScr
quote = Chr(34)
pgm = "C:\test\bin\Debug\test.ex
arg = "arg1"
shell.Run quote & pgm & " " & arg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER