
LICENCE      (c)1993 Roy Coates    (Freeware)


This is a very simple metering utility for DOS based programs which was
written to get me out of a jam until I could write a better one which
would use semaphores to control access.

It works by maintaining a file in SYS:LICENCE for each program to be metered
which contains the maximum number of users allowed for the package, the
maximum number of concurrent users to date, and a list of users currently
holding licences.  The files are in ASCII format so can be viewed if needed.


INSTALLING
-----------------------------------------------------------------------------
Before running the licence program, you MUST create the directory SYS:LICENCE
and make it RWEM for group EVERYONE. Then copy LICENCE.EXE to a mapped
directory such as SYS:PUBLIC

To enable the licencing system, create a licence file for each package using
the command: LICENCE SET <package-name> <max-users>

for example, to create a 10 user licence for Word Perfect you might use:
 
             LICENCE CREATE WP51 10

This creates the file SYS:LICENCE\WP51.LNC


Having created a licence file for each package to be metered, simply call
the packages via a small batch file which should look something like...

LICENCE USE WP51
if errorlevel == 1 goto QUIT
h:\WP51\REALWP.EXE
LICENCE DISCARD WP51
:QUIT
EXIT

Line by line, this batch file:-

Attempts to allocate a licence slot to the user, if it can't, it generates a
suitable message and quits to DOS.  If it can, it calls the real Word Perfect
(which has been renamed here to REALWP) and then discards the licence when
the user leaves Word Perfect.

The one problem with this kind of system is that if a user should leave the
system WITHOUT discarding a licence - the licence remains allocated to him.
To help avoid the obvious problems that this would cause, the licence program
will check that the currently allocated users are indeed active, and if not,
it will recover their licence for use by someone else.

Type LICENCE /?  for online help


Command Options
-------------------------------------------------------------------------------
LICENCE USE <productname>      Grab a licence slot.

LICENCE DISCARD <productname>  Release a licence.

LICENCE STATUS shows what licences are currently assigned.

LICENCE STATUS   Show current status of each licence file.

LICENCE CLEAR <productname>   Clear all slots for one product.

LICENCE SET <productname> <max_users>   Set/Create a licence file

All but the first two commands require console_operator privileges.


This system IS wide open to abuse my smarter users... luckily I don't have
that problem ;)   One answer is to compile the batch files using one of 
the many BAT2EXE or BAT2COM programs available.

Feel free to use this program... I take no responsibility for it. Having said
that - we have used it on a NW3.11 system for 2 years with no hiccups :)

Comments etc to:  roy@mechnet.liv.ac.uk  or  roysan@liv.ac.uk

                                - END -
