Execute dos app, parameters 
Author Message
 Execute dos app, parameters

hello, i would like to execute a DOS program with 1 argument(parameter)

example

c:\test.exe file.txt

using the shell function??
please help Thanks



Tue, 14 Jan 2003 03:00:00 GMT  
 Execute dos app, parameters
[follow-ups to .general.discussion since this isn't COM or API
related]

Martijn,

Quote:
>hello, i would like to execute a DOS program with 1 argument(parameter)

>example

>c:\test.exe file.txt

>using the shell function??

Shell "c:\test.exe file.txt"

Matt

============================================

  VB+ - http://hem.spray.se/mattias.sjogren/
  CodeHound - Free VB Search Engine
  http://www.codehound.com



Tue, 14 Jan 2003 03:00:00 GMT  
 Execute dos app, parameters
Use the ShellExecute API call instead.

--
-Clint LaFever
http://lafever.iscool.net
Home of the Visual Basic Code Depot Add-In


Quote:
> hello, i would like to execute a DOS program with 1 argument(parameter)

> example

> c:\test.exe file.txt

> using the shell function??
> please help Thanks




Tue, 14 Jan 2003 03:00:00 GMT  
 Execute dos app, parameters


Quote:
> hello, i would like to execute a DOS program with 1 argument(parameter)

> example

> c:\test.exe file.txt

> using the shell function??

Yes, that's the only way to do it from VB for DOS.  However, if you are
using VB for Windows, you could use the ShellExecute API call instead but
the Shell( ) function will work there too.  Watch out though:  VBWin does
handle internal COMMAND.COM commands like DIR differently from VBDOS.

Cheers

Derek



Tue, 14 Jan 2003 03:00:00 GMT  
 Execute dos app, parameters

runthis = chr(34) &  "C:\test.exe" & chr(34) & " " & "file.txt"

If file text is the  parm you want to pass

Netserver

On Fri, 28 Jul 2000 14:51:53 +0100, "Martijn Dekker"

Quote:

>c:\test.exe file.txt



Wed, 15 Jan 2003 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Execute dos app, parameters

2. Executing DOS apps w/data from forms

3. Executing DOS/WIN apps

4. Help: hiding a DOS window when executing a DOS batch file

5. question on hiding a DOS window when executing a DOS batch file

6. Executing Parameter Query with 2 parameters

7. Waiting for an application to finish executing before executing next app

8. Executing a 16 bit app from a 32 bit app

9. running DOS PROgram from VB APP using variables in the app

10. DOS App communication with VB App

11. Help Pausing VB4 execution until DOS app finishes (Not Windows App)

12. Help: Keystrokes fm win app to dos app

 

 
Powered by phpBB® Forum Software