#188598 - 2008-07-08 12:29 AM
Closing a kixscript logs me out
|
RachidH
Fresh Scripter
Registered: 2006-05-04
Posts: 18
Loc: The Netherlands
|
i have a test environment with batchfile that calls a kix-script. like so: kix32.exe test.kix /f
it's a pretty long script and sometimes i just want to abort it, so i close the window. but then i get logged out of windows xp !
anyone knows why this is happening or how to prevent it ? have had it on multiple computers, and cant find it on the forums...
|
Top
|
|
|
|
#188600 - 2008-07-08 04:08 AM
Re: Closing a kixscript logs me out
[Re: Mart]
|
Gargoyle
MM club member
Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
|
From the manual
BREAK Action
Enables (BREAK ON) or disables (BREAK OFF) the ctrl+c/break keys and the Close command. This effectively allows control over whether a script run by KiXtart can be interrupted or not.
Syntax
BREAK <ON | OFF>
Remarks
By default, to prevent users from inadvertently interrupting a script, KiXtart automatically disables the ctrl+c/break keys, removes the Close command in the System menu of the current command-prompt window, and hides the Please wait while your logon script executes message box on Windows 9x.
In a multi-tasking environment such as Windows NT, users cannot be fully prevented from interrupting a program. (Programs can be stopped by using the Task List, for example.) As an additional protection, on computers running Windows NT Workstation only, when BREAK is OFF (the default) KiXtart also installs a special event handler for the current console. The effect of this handler is that whenever a user forcibly terminates KiXtart, the user is automatically logged off. This also means that you must be careful when testing scripts.
_________________________
Today is the tomorrow you worried about yesterday.
|
Top
|
|
|
|
#188603 - 2008-07-08 10:17 AM
Re: Closing a kixscript logs me out
[Re: Gargoyle]
|
RachidH
Fresh Scripter
Registered: 2006-05-04
Posts: 18
Loc: The Netherlands
|
Aaaaaah, thanks !
|
Top
|
|
|
|
#188605 - 2008-07-08 12:34 PM
Re: Closing a kixscript logs me out
[Re: Mart]
|
Glenn Barnas
KiX Supporter
Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
|
If NOT @LOGONMODE
Break on
EndIf
2 questions - A. does this actually work? If so, in what version? Under what conditions? I've not been able to get @LOGONMODE to return a value other than 0. (which would make your logic be executed all the time.)
B. I question the need for the logic. If you have a login script, you generally want break off. If you have an admin script, you definitely want break on during dev, and possibly all the time (especially with KF apps where you can [X] close them). Most scripts are designed either as login scripts or not, so I can't (personally) justify the If @LOGONMODE logic in my mind. In the words of our fearless leader - "Edumacate me".
I do (try to) use @LOGONMODE in my login script (with BREAK OFF in the beginning and BREAK ON at the end if an error message appears). I try to use it to determine if the home share should be mapped or not. If a VPN user connects after logging into the PC, they can invoke the login script manually. Since the user didn't do a standard login, they don't have their home share, and the @LOGONMODE will be used to either display a message indicating the home share was (auto)mapped, or will map the home drive. This is the part that has never worked, and displaying @LOGONMODE in the login script always shows "0".
Glenn
_________________________
Actually I am a Rocket Scientist!
|
Top
|
|
|
|
#188612 - 2008-07-08 05:28 PM
Re: Closing a kixscript logs me out
[Re: RachidH]
|
Arend_
MM club member
Registered: 2005-01-17
Posts: 1894
Loc: Hilversum, The Netherlands
|
Or just use taskmgr to kill kix32.exe
|
Top
|
|
|
|
#188650 - 2008-07-09 11:30 PM
Re: Closing a kixscript logs me out
[Re: Glenn Barnas]
|
lundholmster
Just in Town
Registered: 2008-07-09
Posts: 1
|
Nevermind...
Edited by lundholmster (2008-07-09 11:52 PM)
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 242 anonymous users online.
|
|
|