Page 2 of 2 <12
Topic Options
#36023 - 2003-02-05 04:10 PM Re: disable keyboard in win2k
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
As mentioned before, use the KiXtart LOGOFF() function to force a user to be logged off.
code:
IF @WKSTA = 'PDKCITRIX1' OR @WKSTA = 'PDKCITRIX2'
$rc=LOGOFF(1)
ENDIF

_________________________
There are two types of vessels, submarines and targets.

Top
#36024 - 2003-02-05 04:15 PM Re: disable keyboard in win2k
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
also, what is the condition that is checked in the queryuser.bat?

heh, now this jens' piece of code logs off in all situations, but showing what is in that bat would enable us to translate that to kix...

thus making it run as fast as ferrari and even working [Wink]

also, think the problem is that the shell is calling bat without command-interpreter.
proper way would be:
code:
IF @WKSTA = "PDKCITRIX1" OR @WKSTA = "PDKCITRIX2"
IF @INWIN = 1
SHELL "%comspec% /c logout.bat"
if @error=0 logoff(1) endif
ENDIF
ENDIF



[ 05. February 2003, 16:19: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#36025 - 2003-02-05 04:51 PM Re: disable keyboard in win2k
AmunRa Offline
Fresh Scripter

Registered: 2003-02-05
Posts: 8
the queryuser.bat contains:

@query session %username%|findstr "rdp ica"|find /C " "

The logoff works now indeed...only there can still be CTRL+C. But if i get the sleep outta there they haven't got time to CTRL+C or BREAK.
The only thing then is that they don't get a message like you already been logged in somewhere else. How can i solve that then?

Top
#36026 - 2003-02-05 05:02 PM Re: disable keyboard in win2k
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Okay, now we're getting to the meat in your question. Basically, you want to prevent users to log in multiple times, right?

If you would have said that right away, we could have pointed you to a couple of threads discussing solutions for this. One is to use CCONNECT.EXE formt eh Windows Resource Kit, another one is to restrict mapping to a hidden home share to one concurrent user. See Roaming profile
_________________________
There are two types of vessels, submarines and targets.

Top
Page 2 of 2 <12


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

Who's Online
0 registered and 918 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

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

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org