Re: Problems with Shell Method
- From: "Dirk Goldgar" <dg@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 14:37:32 -0400
"Gibson" <imexllc@xxxxxxxxxxx> wrote in message
news:u3pVidOTFHA.3840@xxxxxxxxxxxxxxxxxxxx
> Using a Access2003 database in WinXP I am trying to shell over to a
> third party software to run it. I am using the code line.
> Dim Test
> Test = Shell("C:\Directory\File.EXE Config1.XXX")
>
> The 3rd party software is installed in the same directory as the
> database. The problem is when the File.Exe runs it looks for other
> files to load and claims it can't find them. It claims it can't find
> file Config1.XXX when it is there. Apparently File.exe thinks it is
> running somewhere else than in its directory. When I create a
> shortcut on the desktop to run the File.EXE it works fine. Is there
> a way to shell to a desktop shortcut? I'd rather not have my clients
> have to alt-tab out of the database to the desktop to run this program
>
> Thanks
Try specifying the path to the Config1.XXX file in the Shell
command-line argument:
Test = Shell("C:\Directory\File.EXE C:\Directory\Config1.XXX")
If the directory path contains spaces, you may need to specify quotes
around it:
Test = Shell("C:\Directory\File.EXE ""C:\Directory\Config1.XXX""")
If none of that works, it may be that the program always looks in the
Windows current directory, which isn't necessarily the same as the one
your database is in. You might then try:
ChDir "C:\Directory"
Test = Shell("C:\Directory\File.EXE Config1.XXX")
These are all just ideas, but they may be worth trying.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
.
- Follow-Ups:
- Re: Problems with Shell Method
- From: Gibson
- Re: Problems with Shell Method
- References:
- Problems with Shell Method
- From: Gibson
- Problems with Shell Method
- Prev by Date: Re: Detecting a click from inside another [event]?
- Next by Date: Re: Problems with Shell Method
- Previous by thread: Problems with Shell Method
- Next by thread: Re: Problems with Shell Method
- Index(es):
Relevant Pages
|