-
shell command
hello,
I know how to use shell command but, I don't know how to execute this "c:\abc.exe -a -b c". It is working in shortcut at desktop. when I try
shell "c:\abc.exe -a -b c"
or
hud = shell ("c:\abc.exe -a -b c")
in VB, this command behind the execute file will not passing in to the software. Could any one help?
Thank you very much
Eddie
-
Re: shell command
I have not tested this solution and I don't know if it will work.
Why don't you try putting the command "c:\abc.exe -a -b c" into a file called "abc.bat". If you run this .bat file, does your program execute properly? If it does, then try:
hud = shell ("c:\abc.bat")
-
Re: shell command
Check windows api for CreateProcess... More complex to call but works better.
Nicolas
-
Re: shell command
The Shell function works and it should pass the parameters on the command line to the executable preceding them. In the following example the file test.txt is passed to Notepad and Notepad window is displayed:
ret=Shell("Notepad.exe test.txt",vbNormalFocus)