CHKADDR ------- Copyright (c)1993 Roy Coates (Freeware - for non-profit use only!) Chkaddr was inspired by Jim O'Briens CHKGRP utility which checks to see if the current user is a member of a specified group and returns the result in the DOS ERROR_LEVEL variable. Chkaddr allows you to perform the same actions in a batch file that the %P_STATION variable allows you in a login script. It is intended to check the workstations ethernet address against an address supplied to see if the user is on a particular workstation. And, like CHKGRP - returns the result of this through the DOS ERROR_LEVEL variable. I wrote Chkaddr so that I could prevent users who were NOT members of a particular group from using a specialist workstation we have. This works in conjunction with Jim O'Briens CHKGRP utility and is placed in the system login script as follows. REM Check for authority on Super-Graphics Machine REM Are we on the graphics machine? #chkaddr 004095043210 if "%ERROR_LEVEL" <> "0" goto G_OK REM We ARE on the graphics machine - are we in the GRAPHICS group? #chkgrp GRAPHICS if "%ERROR_LEVEL" == "0" goto G_OK REM Only gets here if on graphics machine without group membership. REM So boot the user off!! write "You are not authorised to use this machine and will now be logged out. #eject :G_OK . Rest of login script... . Possible ERROR_LEVEL values returned are:- 0 = Addresses match. 1 = Addresses do NOT match. 2 = Bad or missing argument. 3 = Not connected to Network. Jim O'Briens CHKGRP utility is currently available at netlab2.usu.edu in the /APPS directory. (Thanks Jim!) Contacting the Author:- Internet: roy@mechnet.liv.ac.uk or: roysan@liverpool.ac.uk --- END ---