I would probably do the following:

In logon script
  check to see if file exists, i.e. x:\logon.txt
  if it doesn't, continue login
  if it does, do logout message and logout.

In logoff script
  delete x:\logon.txt

No very foolproof as the user could just delete the file and logon 
somewhere else.
Just a quick solution off the top of my head.

If you wanted to get really fancy, you could probably use a script to 
modify the Logon On To properties in the login script with the name of the 
current workstation, and clear it on logout.

There is probably a better way that someone else will think of.

These are for the first option:
Login script
8<----------------------------------------------
@echo off
net use x: \\10.0.50.205\%username%$
if exist x:\logon.txt ( 
    goto logoff )
else ( goto continue )
goto continue
:logoff
call MSG.exe %username% "The user %username% is already logged into the 
network somewhere else.  Please log off that workstation before trying to 
log into the network again."
logoff.exe
:continue
setx logdrive "X:"
setx logpath "X:\"
8<----------------------------------------------

Logoff script
8<----------------------------------------------
if exist x:\logon.txt del x:\logon.txt
8<----------------------------------------------

Regards

Tony Patton
Desktop Operations Cavan
Ext 8078
Direct Dial 049 435 2878
email: [email protected]



From:   Rene de Haas <[email protected]>
To:     "NT System Admin Issues" <[email protected]>
Date:   24/05/2010 11:38
Subject:        Re: limited logon script??



No it doesn't work that way. You can log on from many places and link to 
the same share without any problem, unless you configure the share to 
allow only one connection.

On Fri, May 21, 2010 at 9:21 PM, David McSpadden <[email protected]> wrote:
Is this all I really need to do?
Create silent usershare on server.
Add this to top of logon.bat?
 
 
 
echo on
net use x: \\10.0.50.205\%username%$
if errorlevel 1 goto :logoff
goto :continue
:logoff
call MSG.exe %username% "The user %username% is already logged into the 
network somewhere else.  Please log off that workstation before trying to 
log into the network again."
logoff.exe
:continue
setx logdrive "X:"
setx logpath "X:\"
 
?Please consider the environment before printing this email.?

 
 
 

 
 
This e-mail is intended only for the addressee named above. The contents should 
not be copied nor disclosed to any other person. Any views or opinions 
expressed are solely those of the sender and do not necessarily represent those 
of QUINN-Insurance Limited (Under Administration), unless otherwise
specifically stated . As internet communications are not secure,
QUINN-Insurance Limited (Under Administration) is not responsible for the 
contents of this message nor
responsible for any change made to this message after it was sent by the 
original sender. Although virus scanning is used on all inbound and outbound 
e-mail, we advise you to carry out your own virus check before opening any 
attachment. We cannot accept liability for any damage sustained as a result of 
any software viruses.

====================================================================

QUINN-Insurance Limited (Under Administration) is regulated by the Financial 
Regulator and
regulated by the Financial Services Authority for the conduct of UK
business.

====================================================================

QUINN-Insurance Limited (Under Administration) is registered in Ireland, 
registration number
240768 and is a private company limited by shares. 
Its head office is at Dublin Road, Cavan, Co. Cavan.




This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

<<image/gif>>

Reply via email to