Need help with launching another exe with command line switches

  • Thread starter Thread starter Danny
  • Start date Start date
D

Danny

I would like to be able to run a few applications with a command line switch
as if you were running it from a shortcut.
Sort of like a bat file but I need to be able to run the files with the long
names and with spaces.

I am using an access 2000.

like this

c:\files\launche.exe /r /p c:\mylaunchfiles\launch file 1
c:\files\launche.exe c:\mylaunchfiles\launch file 2
c:\files\launche.exe c:\mylaunchfiles\launch file 3

How can I do this in access to accomodate these long file names and with
switches.

Thanks in advance

Danny
 
Make a string containing the command line, and pass it to Shell:

dim strCmd as string

strCmd = "c:\files\launche.exe /r /p c:\mylaunchfiles\launch file 1"

Shell strCmd

Be aware that Shell will launch the app, then move on to the next command
and do that too. Can be a problem if you use Shell to create a file, then
expect the next command to work on that file - it may not have been created
yet.


--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 
Back
Top