Page 1 of 1 1
Topic Options
#132516 - 2005-01-15 05:54 PM Bug: @LOGONMODE returns empty value
mdodd Offline
Lurker

Registered: 2004-04-14
Posts: 4
This is a return to a post from July '04 where earlier versions were noted as not returning a value on @LOGONMODE. I've experimented with this again and it also exists in 4.23 (at least it does in my environment!).

Just in case anyone was wondering why you'd use it, it's really useful for debugging where you want to ensure you can test production changes against the latest release area i.e. if LOGONMODE isn't '1' we're debugging and therefore pull the sub-scripts and settings from the over there (rather than one of 60+ domain controllers).

Am I unique in seeing this, or is it an accepted fault?

Thanks
Matthew

Top
#132517 - 2005-01-15 06:09 PM Re: Bug: @LOGONMODE returns empty value
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
you may be the only one trying to use it
_________________________
!

download KiXnet

Top
#132518 - 2005-01-15 06:26 PM Re: Bug: @LOGONMODE returns empty value
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I can confirm it has been broken on all builds after 4.10, upto and including 4.5b2.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#132519 - 2005-01-15 08:54 PM Re: Bug: @LOGONMODE returns empty value
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
there is no such build as 4.5b2
_________________________
!

download KiXnet

Top
#132520 - 2005-01-15 09:30 PM Re: Bug: @LOGONMODE returns empty value
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Right you are..
KiXtart 2010 Alpha 2... build 144
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#132521 - 2005-01-15 09:40 PM Re: Bug: @LOGONMODE returns empty value
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
hmm...
was that 2010 decided codename?
well, anyways. what I ment was that it's 4.5a2 not b.
_________________________
!

download KiXnet

Top
#132522 - 2005-01-17 09:52 AM Re: Bug: @LOGONMODE returns empty value
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4945
Loc: Leatherhead, Surrey, UK
Not a fix for the problem, but here is how I deal with the development / test issue:
Code:
$=SetOption("Explicit","ON")			; Sanity check for variable names.
$=SetOption("WrapAtEOL","ON") ; Wrap lines at console margins rather than truncating.

Global $__DEVELOPMENTDIR
$__DEVELOPMENTDIR=@HOMESHR+"\Dev\LoginScripts"

If Not IsDeclared($__ROOT)
GLOBAL $__ROOT ; Path to installation
$__ROOT=Left(@STARTDIR,InStrRev(@STARTDIR,"\")-1)
EndIf

; Allow diversion to development instance.
If IsDeclared($__DEVELOPMENT)
If $__DEVELOPMENT=1 AND Exist($__DEVELOPMENTDIR+"\Dev\Login\LoginScripts\"+@SCRIPTNAME)
$__DEVELOPMENT=0
$__ROOT=$__DEVELOPMENTDIR+"\Dev\Login"
CALL $__ROOT+"\LoginScripts\"+@SCRIPTNAME
Quit @ERROR
EndIf
EndIf

If Not IsDeclared($__DEBUG) ; Allow debug to be set from command line
GLOBAL $__DEBUG ; Generate additional info.
$__DEBUG=0 ; Default is no debugging info
EndIf



As you can see, I do it by setting variables on the command line.

$__DEVELOPMENT is a boolean, set to true if I want the script to run the dev version. If it is set the script will try to find a copy of itself with the same name in the dev tree, and if it finds one it will launch that version instead ($__DEVELOPMENT is reset to ensure that the dev script doesn't call itself in an endless loop!). In my environment $__DEVELOPMENTDIR is set to a subdirectory of @HOMESHR which allows different staff to try things out without fear of clashing.

$__ROOT can be set to force the currently script to look for support libraries and files other than in the directory that it was started in.

$__DEBUG if set outputs debugging information. The higher the value that it is set to the more debugging output.

The benefit of using variables like this is that they can be set on an individual login, and you can test the script within the live environment without affecting other users.

Top
#132523 - 2005-01-31 05:04 PM Re: Bug: @LOGONMODE returns empty value
mdodd Offline
Lurker

Registered: 2004-04-14
Posts: 4
...I feel isolated and alone with my broken function (which also returns me....nothing)....

<sigh>

Top
#132524 - 2005-01-31 05:06 PM Re: Bug: @LOGONMODE returns empty value
mdodd Offline
Lurker

Registered: 2004-04-14
Posts: 4
Thanks for the steer on how you manage your debugging process Richard - it's a nice approach.

Looks like I'll have to rethink this...

Matthew

Top
Page 1 of 1 1


Moderator:  ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 142 anonymous users online.
Newest Members
Jodey, Hiker, GTRoberts, KatieQuinn, Brennnnn
17684 Registered Users

Generated in 0.033 seconds in which 0.012 seconds were spent on a total of 12 queries. Zlib compression enabled.