[AccessD] Launching a dos program from Access 97

Heenan, Lambert Lambert.Heenan at AIG.com
Mon Feb 27 11:33:17 CST 2006


This should be simple enough. Evidently prethin.exe needs to find files in
the current folder (which needs to be C:\fmv), so all you really need is a
batch file...

@Echo Off
C:
CD \FMV
Prethin

... The batch file above will take care of setting the current folder, and
you would launch it like this...

Dim strComspec as String
Dim strBatch as  string
Dim nProgId as Long

   strComspec = Environ("COMSPEC")
   strBatch = "X:\SomeFolder\LaunchPrethin.BAT"
   nProgid = Shell(strComspec & "/C  " & strBatch )

HTH

Lambert


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Boogie Loogie
Sent: Monday, February 27, 2006 8:06 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Launching a dos program from Access 97


still working on it...on back burner for a couple of hours. I have deadline
on something else right now. I will let you know how I do and post a working
code here (If I get there from here) Thanks again.

On 2/27/06, Gustav Brock <Gustav at cactus.dk> wrote:
>
> Hi Tim
>
> You are welcome. But did you find a method?
>
> /gustav
>
> >>> boogieloogie at gmail.com 27-02-2006 13:43:07 >>>
> Thanks Gustav
>
> On 2/26/06, Gustav Brock <Gustav at cactus.dk> wrote:
> >
> > Hi Tim
> >
> > Just guessing ... create a batch file that will launch and run the 
> > application. You may need to use CD to make the folder of the app 
> > the current folder. When success with this, use Shell() to launch 
> > the batch file.
> >
> > If that fails, try with a shortcut or pif file.
> > Also, you may try using Shell() with the START command. Type START 
> > /? on the command line for help on this.
> >
> > /gustav
> >
> > >>> boogieloogie at gmail.com 26-02-2006 22:23 >>>
> > Hi Gustav
> >
> > I should have explained myself a bit better. The particular program 
> > will not fire by using
> >
> > Dim ProgLaunch
> > ProgLaunch = Shell("C:\fmv\prethin.exe", 1) will crash it. For some
> reason
> > certain files are not fired when starting this way. I have no access 
> > to the code nor the programmer of the dos program.
> >
> > Some how I have to fire c:\windows\system32\cmd.exe change to the 
> > fmv folder then launch prethin.exe from there.
> >
> > Any ideas?
> >
> > Thanks
> >
> > Tim
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list