Originally Posted by bart21
sorry for the oldish bump, just that I was doing this exact thing today..
but i found a hole in the plan... (which is why i ended up here )
(please excuse my cruddy cmd skills)
rem check for the logon file to exist
IF EXIST \\curricsvr2\logs$\logonchecker\%username%.log \\curricsvr2\netlogon\scripts\vbmessage.cmd
rem create a log file of usage by username
echo %username% >> \\curricsvr2\logs$\logonchecker\%username%.log
@echo MSGBOX "You are already logged on. Please log off that machine before starting a new session." > %temp%
@Del %temp%\TEMPmessage.vbs /f /q
rem file check clear
which is the theory....
it only works once!
because once you try and logon again - you get logged off. and then it calls the logoff script and clears your logon flag. So your free to login.