Hello,

Iīm using kixstart for a while now, and while I canīt call myself "good" at it, Iīm not a complete newbie..

I have 2 scripts which have to use BREAK ON, thus make the user[s] able to close the script before it exits.. ever since weīve gone from kix 3.62 to later versions [4.02 etc] I canīt get BREAK ON to work..Users just canīt exit from the script and itīs a pain. Pls tell me what I do wrong because I canīt see it..

Included here is a copy of a script I wrote to make it easier for my [l]users to connect to a printer. For many of them browsing the network/server for a printer is a daunting task which was just to complicated.. [Mad] This script allows them to just enter the printername & hit enter..

anyway: with kix version =< 3.62 the users could exit from it, but now...no more. worse still, even after the script has completed the window is not closeable, except afcourse when they logoff/logon..

the script output is in dutch, but that shouldnīt be a big problem...

the script uses a HIDDEN$ [doh] share on the printserver on which everyone has READ rights to check if a server is online..

the script calls a batch file d.bat which is very simple it is just the following 2 lines:

@ECHO OFF
START %PRINTERVAR%

the printerad.kix file:
[iīve replaced company, groups, department & servernames with fictional ones, hope you understand why..]
also I had to replace normal parenthesis with [ and ]to be able to post it here...strange..or not?

;addprinter script, dit script maakt op aanwijzingen van een gebruiker een printer aan
;dit is onder Windows95 en Windows NT4 getest,
;werkt voor 99,9% zeker ook onder Windows2000, Windows XP, Windows 98 en Windows ME
; variabelen in gebruik:
;$SERVERNAAM
;$PRINTERNAAM
;$ANSWER1
;LABELS in gebruik
;SERVERSELECT
;PRINTERSELECT
;PRINTERDIALOOG1
;GO1
; v2.0 2 JAN 2001 [C]NPK [BREAK=ON ERBIJ]

BREAK ON
color y+/b
cls
flushkb
:SERVERSELECT
? "=================================================================="
? "COMPANYNAME, DEPARTMENT 2001"
? "een moment alstublieft..."
? "=================================================================="

if INGROUP ["BO"] GOSUB "SRV1" endif
if INGROUP ["GO"] GOSUB "SRV1" endif
if INGROUP ["RD"] GOSUB "SRV1" endif
if INGROUP ["PU"] GOSUB "SRV1" endif
if INGROUP ["CS"] GOSUB "SRV1" endif
if INGROUP ["BW"] GOSUB "SRV1" endif
if INGROUP ["BD"] GOSUB "SRV2" endif
if INGROUP ["BR"] GOSUB "SRV2" endif
if INGROUP ["CU"] GOSUB "SRV2" endif
if INGROUP ["EX"] GOSUB "SRV2" endif

if $servernaam <> "SERVER2"
if $servernaam <> "SERVER1"
CLS
? "=================================================================="
? "Dit script kan GEEN Printserver vinden! Misschien is er iets mis "
? "met een van de servers of met het netwerk. Neem svp contact op met"
? "de COMPANY Klantenbalie, telefoonnummer xxxxx"
? "=================================================================="
sleep 10
goto UIT
endif
endif

color w+/b
? " De beschikbare server in deze sessie is $SERVERNAAM geworden...."
color y+/b

? "=================================================================="
cls
GOSUB PRINTERSELECT
GOSUB GO1
? "dit programma is klaar, Windows printerinstallatie is gestart..."
? "=================================================================="

:UIT
EXIT

:SRV1
if exist ["\\SERVER1\HIDDEN$\CHECK.TXT"] $SERVERNAAM = "SERVER1"
ELSE $SERVERNAAM = "SERVER2"
ENDIF
RETURN

:SRV2
if exist ["\\SERVER2\HIDDEN$\CHECK.TXT"] $SERVERNAAM = "SERVER2"
ELSE $SERVERNAAM = "SERVER1"
ENDIF
RETURN

:PRINTERSELECT
? "=================================================================="
? "toets de Printernaam in, dit staat op iedere printer op een"
? "sticker, en begint altijd met PR0nummer [voorbeeld: PR0511]"
? "als U de juiste printer heeft ingevuld, druk dan op ENTER"
color W+/b
? "LET OP: EERSTE cijfer is een NUL geen letter O!"
color y+/b
? "=================================================================="

color w+/b
? "-->"
color r+/b
GETS $PRINTERNAAM
color y+/b
GOSUB PRINTERDIALOOG1
RETURN

:PRINTERDIALOOG1
cls
? "=================================================================="
? "De gekozen PRINTER naam is"
color r+/b
? "$PRINTERNAAM"
color y+/b
? "is dit juist?"
? "ENTER doorgaan, toets N[ee]om opnieuw een printerselectie te maken"
? "=================================================================="
color w+/b
? "-->"
color y+/b
GET $ANSWER1
IF $ANSWER1 = "n" OR $ANSWER1 = "N" GOSUB PRINTERSELECT
ENDIF
RETURN

:GO1
SETL "PRINTERVAR=\\$SERVERNAAM\$PRINTERNAAM"
RUN "D.BAT"
RETURN