olmeca3332003
(Fresh Scripter)
2003-10-26 04:27 PM
Hide windows button

I use a batch file as my logon script, User stop the script before it complete. Starting the script in minimize mode didn't help. Can I hide the title stop button? Any help will be
appreciated.


Richie19Rich77
(Seasoned Scripter)
2003-10-26 04:34 PM
Re: Hide windows button

Why not use wkix32.exe, this will not bring up a window if used if "-i"

[ 26. October 2003, 16:35: Message edited by: Richard Farthing ]


Everyone
(Getting the hang of it)
2003-10-26 04:41 PM
Re: Hide windows button

BREAK ON

Mart
(KiX Supporter)
2003-10-26 08:33 PM
Re: Hide windows button

Kix has a lot more functionality for use as a logon script processor. I’d dump the batch file and convert it into kix if possible.

If the console windows should not be shown you should use wkix indeed. If using wkix is not an option you could use the line below at the top of your script. Be sure that there will be absolutely no screen output from your script because the console window will be shown if there is.

code:
SetConsole ("Hide")

Using wkix would be the best solution though.

[ 26. October 2003, 20:36: Message edited by: R2D2 ]


Mart
(KiX Supporter)
2003-10-26 08:40 PM
Re: Hide windows button

quote:

BREAK ON

No, this will enable the user to quit the script which is just what olmeca3332003 does not want.

Quote from the 4.22 rc1 manual.

quote:

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.

olmeca3332003:
Be careful which button you click for any next posts. Posting a poll when it should be a message is not liked by most of the residents on this board and is actually explained here: section c of the topic behind this link.

[ 26. October 2003, 20:51: Message edited by: R2D2 ]


olmeca3332003
(Fresh Scripter)
2003-10-26 09:06 PM
Re: Hide windows button

The console windows have to be shown. I’m not familiar with Wkix32 yet, that is my next project. Is it possible to call a script from the batch to disable the button?

Richie19Rich77
(Seasoned Scripter)
2003-10-26 09:15 PM
Re: Hide windows button

Wkix32 is not a different application, just a console less version of kix32. [Big Grin] Some people will hate me saying that.

If window has to be shown, then use Break Off

[ 26. October 2003, 21:16: Message edited by: Richard Farthing ]


Mart
(KiX Supporter)
2003-10-26 09:18 PM
Re: Hide windows button

quote:

I’m not familiar with Wkix32 yet, that is my next project.

it's easy, just use wkix32 yourscript.kix instead of kix32 yourscript.kix. But oke one thing at a time.

quote:

Is it possible to call a script from the batch to disable the button?

Using Break Off at the top of your kix script would disable the x button for the console window in which the kix script is running. Other kix scripts called from the batch file after the first one would have the x button enabled.

Little question:
Running Windows NT, 2K, XP, 2K3 the user would get logged of imidiatly when the user clicks on the x button. Kix is originally a logon script processor, so if the user does not want the logon script to run and exits it manually kix will exit the user [Big Grin] Are you running Win9x or something?


olmeca3332003
(Fresh Scripter)
2003-10-26 11:17 PM
Re: Hide windows button

I see where I will have to wait until I can convert my DOS bat file to Kix script. I will be watching for any new development.

Mart
(KiX Supporter)
2003-10-26 11:21 PM
Re: Hide windows button

Or post it here if possible. Maybe (if you ask nice [Big Grin] ) we can give it a try in some spare time.

Sealeopard
(KiX Master)
2003-10-26 11:49 PM
Re: Hide windows button

If the login script is started via a batch file, e.g. LOGIN.BAT, for all users, then BREAK OFF in the first line of the code will log users out if they try to close the window. Thus, it should be hidden in addition with SETCONSOLE('HIDDE'). The use of WKIX32 would not make any difference in this situation as the window is invoked by the batch file.

If the login script is called via e.g. KIX32 LOGIN.KIX, then replacing KIX32 with WKIX32 adn suppressing any and all console output as described in the FAQ Forum will effectively hide the script.


LonkeroAdministrator
(KiX Master Guru)
2003-10-27 11:31 AM
Re: Hide windows button

using wkix32 with console-window is not impossible.
and it has disabled close-button as default.
whereas kix32 can kick the user of when he behaves bad, wkix32 just denies the joy of doing bad from the user.