|
-
August 17th, 2001, 09:53 AM
#1
Using the Shell function
Im trying to use the Shell function in order to start an executable file that requires an argument (a file name). The program can only be executed from the command promt (DOS) and the argument is a file name (converts .wad files to .pcx files). It doesn't work. I can see that the progam starts the same way it does when i double klick on it in windows, that is without an argument. But it refuses to read the argument when i use Shell "C:\wad3.exe & " " & fileName, 2 . If i start it from the command promt (like: c:\wad3.exe batman.wad) it works as intended.. Any idea how to solve this problem? Is there any other function that can be used?
-
August 17th, 2001, 10:05 AM
#2
Re: Using the Shell function
Put the whole command line into the string, i.e
dim myStr as string
myStr = "C:\wad3.exe " & fileName
Shell myStr
That should work.
Andrew
-
August 17th, 2001, 10:16 AM
#3
Re: Using the Shell function
Nope, doesn't make any difference... ahhh, this problem drives me crazy!!!
Thanks anyway mate!
-
August 17th, 2001, 10:26 AM
#4
Re: Using the Shell function
Hello again,
It seems to work for me....one thing I noticed though - you need to include the DOS name instead of the Windows one, i.e if you are specifying a path then My Documents becomes MYDOCU~1 - if you are specifying a file to open the pass the directory in the DOS format.
Thanks
Andrew
-
August 17th, 2001, 10:36 AM
#5
Re: Using the Shell function
i have copied both the executable and the file to convert to c: just for testing purpose so thera are no long file names. Also i have tried with other dos programs, for example Shell "Regsvr32.exe " & "test.dll" which works excellent. So I cannot understand why this wad3-program only runs from the command promt... it's coded with c++, so maybe I should make a post to that forum instead...
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
|