

                              IfLogged

                                v1.0

                    Copyright (c)1995 Roy Coates

IfLogged is intended to be run from a batch file and checks to see if a
specified user is currently logged on. The result of the check is returned
in the DOS errorlevel variable.

I originally wrote this to prevent users from copying our template Windows
files if the template owner was logged on at the time (since the chances
are that the template owner was modifying the files!)

The syntax for IfLogged is:-  IfLogged <username>

Errorlevels returned are:-    0  The user is not logged in.
                              1  The user IS logged in.
                              2  No such user was found in the Bindery.

A simple example batch file to report the outcome of such a check would
be as follows...

@echo off
IfLogged %1
if errorlevel 2 goto BADNAME
if errorlevel 1 goto LOGGED
echo That user is not currently logged on.
goto DONE
:BADNAME
Echo No such user in Bindery.
goto DONE
:LOGGED
Echo That user IS currently logged on.
:DONE


As usual - this is freeware, all I ask is that you drop me a brief note
via e-mail if you find the program useful, find bugs, have ideas for
improvement, have ideas for other utils etc etc.

                                                    roy@mechnet.liv.ac.uk

                                  - END -
