All,

My idea is the following:

Log the Workstation name of the computer the users logs on to into a textfile on the users homeshare with WRITEPROFILESTRING.

WRITEPROFILESTRING ("Filename", "Network", "LoggedOnTo", @WKSTA)

During logon, read that value with READPROFILESTRING

$LoggedOnTo = READPROFILESTRING ("file name", "Network", "LoggedOnTo")

Do an "NBTSTAT -a $LoggedOnTo" and check the output for the users username.
If that username is inthere, the user is still logged on to that workstation, so do NOT update the file on the usershare and force a logoff.
If the username is NOT found in the output of that NBTSTAT, update the textfile on the usershare and continue logon.

This way, a user can also normally logon if he/she was logged off abnormally.

PLease give me feedback about this!

Regards,

Marc

------------------
M.A.C. Duiker (Marc)
Migration Specialist (MCSE)
Marc.AC.Duiker@ici.com
[img]https://partnering.one.microsoft.com/SecureImages/mcp_c.gif[/img]