Re: Who started me?
- From: "Arno R" <arraNOcomSPAM@xxxxxxxxxx>
- Date: Tue, 28 Feb 2006 10:15:44 +0100
"Tom van Stiphout" <no.spam.tom7744@xxxxxxx> schreef in bericht news:6sm7021rbh6nqv76gp7lvp1c6q301dbbi6@xxxxxxxxxx
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?
Salad gave you a good idea: You can have your launcher create some file.
But I would only delete (and force a delete...) this file when the app ends.
That way you can not only control 'who' launched your app, but also prevent the app to be started more than once from the same workstation.
Or: don't show anything on screen until your /x macro has run.
Show your mainform only from the /x macro
Or: kill the app with a timer event on a hidden form when your /x macro has not run
Arno R
.
- References:
- Who started me?
- From: Tom van Stiphout
- Who started me?
- Prev by Date: Re: Sharing a backend over the internet
- Next by Date: Re: Conversion of an MS Access application
- Previous by thread: Re: Who started me?
- Next by thread: Re: Who started me?
- Index(es):
Relevant Pages
|