Who started me?
- From: Tom van Stiphout <no.spam.tom7744@xxxxxxx>
- Date: Mon, 27 Feb 2006 22:24:18 -0700
I have a "Launcher" application that does version checking. It will
copy a newer version from the server if needed, and then start the
main application. I believe Tony Toews "Auto FE Updater" serves a
similar purpose. My app calls ShellExecute to run the command line
specified in a "Launcher.ini" file. A typical command line may be:
AppCommandLine="C:\Program Files\Microsoft
Office2003\OFFICE11\MSACCESS.EXE" C:\Test\Test.mde
This all works fine. The path to MsAccess is typically there because
my users often have more than one version installed.
Now I want to know if my application was started by Launcher, or by
some other way. I would then refuse to run. My first idea was to add:
/x LaunchedByLauncher
to the command line. This macro would call a function that would set a
global variable, which I could test for in my startup code.
Alas, /x runs too late: the AutoExec macro runs first, then the /x
macro runs.
So I'm open to suggestions. How can I know who started me?
One thought is to keep Launcher.exe running a bit longer (currently it
is start-and-terminate), and then call FindWindow to see if it is
running. Seems like a cumbersome process and technically I would not
be 100% sure that instance of Launcher started Me.
Thanks,
-Tom.
.
- Follow-Ups:
- Re: Who started me?
- From: Anthony England
- Re: Who started me?
- From: Arno R
- Re: Who started me?
- From: salad
- Re: Who started me?
- Prev by Date: Re: Similar Programs - MS ACCESS
- Next by Date: From text box to field
- Previous by thread: Access or SQL Server 2005?
- Next by thread: Re: Who started me?
- Index(es):
Relevant Pages
|
|