|
-
September 19th, 2001, 04:58 AM
#1
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
-
September 19th, 2001, 06:49 AM
#2
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")
-
September 19th, 2001, 07:39 AM
#3
Re: shell command
Check windows api for CreateProcess... More complex to call but works better.
Nicolas
Nicolas Bohemier
-
September 19th, 2001, 08:17 PM
#4
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)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|