k, you control the logoff from the batch.
still, my suggestion would be to include the logic in the script.

you can write this differently though thus enabling it.

do the batch as:
code:
IF %COMPUTERNAME%==PDKCITRIX1 GOTO LOGOFF
IF %COMPUTERNAME%==PDKCITRIX2 GOTO ENDLOGOFF
GOTO ENDLOGOFF
:LOGOFF
For /F "Tokens=1" %%I in ('\\pdkfp\netlogon\queryuser.bat') Do Set sessions=%%I
IF %sessions%==1 goto ENDLOGOFF
msg %sessionname% U ben al een keer aangemeld en wordt uitgelogt, neem contact op met afdeling ICT
sleep 3

:ENDLOGOFF
exit 1

and then the kix:
code:
IF @WKSTA = "PDKCITRIX1" OR @WKSTA = "PDKCITRIX2"
IF @INWIN = 1
SHELL "\\pdkfp\netlogon\logout.bat"
if @error=0
run "logoff %%SESSIONNAME%%" exit 0
endif
ENDIF
ENDIF

you don't need the break off.

[ 05. February 2003, 15:38: Message edited by: Lonkero ]
_________________________
!

download KiXnet