Chapter 10. Licensing MS-DOS and Windows applications
Prev |  | Next

## Chapter 10. Licensing MS-DOS and Windows applications

SoftWindows includes a built-in licensing system which allows you to set up licenses for third-party MS-DOS and Windows applications. You can use this to monitor or enforce the licensing restrictions imposed by the MS–DOS and Windows applications used with SoftWindows.

In particular, the licensing feature allows you to:

- Limit the number of users who can run a particular application.

- Prevent applications from being run beyond a specified expiry date. This can be used to ensure that users stop using an old version of an application.

- Provide a record of the applications being used, the users using them, and the hosts on which they are run.

To license applications you need to:

- Enable MS-DOS and/or Windows licensing for each SoftWindows user.

- Generate an application license for each MS-DOS or Windows application you want to license.

- These procedures are described in the following sections.

## Setting up application licensing

The SoftWindows application licensing uses a small MS-DOS and/or Windows program to monitor each session being run. It then uses the standard FLEXlm system to administrate the licenses.

Although the system is effective, it is not guaranteed to be completely secure. Malicious users may be able to disable the licensing system, which will prevent any checking against licenses when applications are started.

The licenses themselves are set up using a GENLIC utility, provided with SoftWindows.

Once an application is licensed, a user will be prevented from running an unauthorized copy and receive an error message, such as the following:

Figure 10-1. FlexLM Error Message

### To enable MS-DOS application licensing

- Add the following line to each user's AUTOEXEC.BAT file:

      C:\INSIGNIA\DOSLIC.EXE

The default AUTOEXEC.BAT file supplied with SoftWindows includes this line, commented out. To enable it, just remove the REM statement at the beginning of the line.

### To enable Windows application licensing

- Add the following line to the [windows] section of each user's WIN.INI file:

      LOAD=C:\INSIGNIA\WINLIC.EXE

The default WIN.INI file supplied with SoftWindows includes this line near the beginning of the file, commented out. To enable it, remove the “;” at the start of the line.

| Note: MS-DOS and Windows applications are licensed independently. For example, if you only want to license Windows applications, you only need WINLIC.EXE; there is no need to run DOSLIC.EXE.

## Generating application licenses

SoftWindows includes a GENLIC utility to generate the licenses for MS-DOS and Windows applications.

For security reasons, the program is not installed on the default SoftWindows hard disk file, but in the Unix directory:

     $SWIN2HOME/dos/insignia

### To run the license generator

1. Configure a suitable FSA drive by typing the following command at the MS-DOS C:\> prompt:

       NET USE F: $SWIN2HOME/dos/insignia

You can now run GENLIC from the FSA drive or copy it to a suitable directory.

### To generate a license

1. Type the following command at the MS-DOS C:\> prompt.

       GENLIC application R

where application is the full drive, path, and name of the application to be licensed. For example, to license Microsoft Word for Windows you would type:

    GENLIC C:\WORD\WINWORD.EXE R

The following screen is displayed:

Figure 10-2. GENLIC Screen

This prompts you for the following information:

Table 10-1. GENLIC Prompts

Prompt | Description
--- | ---
Start date | The date from which the license is active.
Expiry date | The date the license expires.
Number of | The number of simultaneous
users | copies of the application that may be run.
User string | A string of up to 64 characters describing the application, to help identify the appropriate line in the license file. This defaults to the application filename.
Server name | The host name of the license server workstation.
Server ID | The host ID of the license server workstation.

To obtain the server ID:

- Login to the license server and type the following command at a shell prompt:

      $SWIN2HOME/FLEXlm/lmhostid R

Alternatively, see the SERVER line in the existing license.dat file.

The GENLIC utility will then display the correct license line on the screen, as shown below, and you should write this down before exiting or entering information for another application.

A sample license line is as follows:

    FEATURE VaTG62Ua insignia 1.000 1-jan-04 4 5DC04041C6EE3F7CCC43 “EDIT.COM”

The fields in this line are described in the following table

Table 10-2. GENLIC License Line

Field | Description
--- | ---
FEATURE | Identifies the type of line to the license server.
VaTG2Ua | An encrypted feature name, generated from the MS-DOS or Windows program being licensed.
insignia | Specifies that the Insignia daemon controls the license.
1.000 | The version number of the feature. This will always be 1.000 for MS-DOS and Windows application licenses.
1-jan-0 | The expiry date, if specified.
4 | The number of users.
5DC0… | The FLEXlm encryption code.
EDIT.COM | The user string. Can be set to any string value when the license is created, but cannot subsequently be changed.

### To define a license for unlimited users

- Specify the number of users as 0, and include a further field, DEMO, following the number of users.

The encrypted feature name depends on the application program file, and is independent of the program name or path name. However, different versions of the same program will generate unique feature names and must be licensed independently. Therefore, for each program license either ensure that all users are using the same version or make separate licenses for each version in use.

### To install the application licenses

The MS-DOS and Windows application licenses must be added to the license file used by the Insignia licensing daemon unless it is combined with licenses for other products. The default location is:

    install/FLEXlm/license.dat

where install is the SoftWindows installation directory.

1. Add the feature line displayed by GENLIC for each MS-DOS or Windows application to the end of the license file using a suitable text editor, such as vi.

   Be careful to enter the feature line exactly as displayed by GENLIC, and on a single line.

   There must only be one feature line for each unique feature name, that is, for each unique MS-DOS or Windows application.

2. After making changes to the license file, type the following command at the Unix prompt:

       install/FLEXlm/lmreread -c install/FLEXlm/license.dat

   where install is the SoftWindows installation directory.

   This ensures that the licensing daemon takes account of the changes. Changes to the license file will normally only take effect on copies of SoftWindows which are started after lmreread has been executed.

### To change the license for an application

To change the license for an application proceed as follows:

1. Generate a new feature line using GENLIC.

2. Replace the existing line in the license file.

For example, you can do this to increase the number of licenses available.

If the license file includes two lines with identical feature names, the second one will be ignored, and an error will be reported in the FLEXlm daemon log file.

### Sample license file

The listing below shows a sample license file containing a SoftWindows FEATURE line, and FEATURE lines for an MS-DOS and a Windows application.

    SERVER ivy 4606bc4e 744
    DAEMON insignia /usr/lib/SoftWindows/FLEXlm
    FEATURE SoftWin2 insignia 1.000 01-jan-00 20 145BF061754DC412304A “5003 6583 7650 0020”
    FEATURE VaTG62Ua insignia 1.000 1-jan-0 4 5DC04041C6EE3F7CCC43 “EXCEL.EXE”
    FEATURE 9VHNPQ83 insignia 1.000 30-jun-1996 0 D9E6A0F149743A74F357 “WP.EXE”

Prev | Table of Contents | Next
Chapter 9. Networking with SoftWindows |  | Chapter 11. Reference