@USERNAME in Startup Procedure (OpenInsight 32-Bit)
At 24 AUG 2004 07:55:51PM Chris Callaghan wrote:
I've got a startup procedure (set in the Env Record at ENV_STARTUP_PROC$) where I need to perform a different initialisation action for a particular username.
Unfortunately @USERNAME isn't set (or is set to SYSPROG) as the Startup proc is called during SWAP_DATABASE. Is there another way to get the username at this point?
At 25 AUG 2004 03:49AM Steve Smith wrote:
Perhaps you could set an environment variable to the name of the exceptional user, then read it inside OpenInsight.
At 25 AUG 2004 07:59PM Chris Callaghan wrote:
I could do I guess - a bit nasty though
![]()
I'm trying to speed up the startup when using OECGI, so I was thinking along the lines using a specific user for OECGI so I can bypass some of our processing in the startup.
Is there any other way of telling in the Startup whether we're using OECGI?
At 25 AUG 2004 10:11PM Richard Hunt wrote:
Chris…
Not sure this will help… the @WINDOW variable is NULL when OECGI is used.
At 27 AUG 2004 08:37AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Chris,
Another way is to use the GetCommandLine windows API function which returns the actual command line used to launch the current process.
It should be prototyped (in OI7) from kernel32 as
LPASTR STDCALL GetCommandLineA( VOID ) as GetCommandLineIf in OI 4 prototype it as:
LPCHAR STDCALL GetCommandLineA( VOID ) as GetCommandLineEg:
declare function GetComandLinecmdLine =GetCommandLine()So you can insert this function in your startup proc and if you are executing within the OECGI context you will see "OECGI.EXE" in the cmdLine variable returned from this function.
If you execute your OI app as normal you should see whatever was in your shortcut that you started OI with.
World Leaders in all things RevSoft
At 29 AUG 2004 07:50PM Chris Callaghan wrote:
That did the trick. Thanks Mr Sprezz :)