License Files and Aliases

The license file is a binary encoded file is created when the user first runs your application, or it can be created by you and distributed with your application. This file will contain your application's license status as well as many other settings.

The wizard allows four different options for license file creation:

If you wish to have the file created when the user first runs the application select one of the three "Auto-create" options. If you would like to distribute the license file with your application select the "Pre-create" option.

Important

When pre-creating the license file you do not need to distribute a separate license file for each user – you only need to create one master license file and add it to your distribution program.

Alias files

An application can utilize multiple license files. The first file opened is the primary or master license file. Multiple synchronized backup copies, or aliases, of this primary license file can be scattered on the user's system to prevent demo re-installation. If the user were to restore from backup or delete a license file to attempt to gain additional use of your demo, one of the alias files can automatically restore the correct license information and defeat the hacker's tampering attempt.   

All open aliases are automatically synchronized whenever data is written to the primary license file. Multiple aliases in varying license file Storage Locations can be active at one time. Typically, the primary license file is stored in the application directory or created on first execution in the application folder or the registry, one or more aliases are stored in the Windows Registry, Windows, or Windows\System(32) directory. The more aliases you have, the more difficult it will be for a hacker to gain additional time with your demo.   

Bypassing aliases during development

While aliases can be a powerful tool when running on a user's computer, they can also get in the way of your development, especially as you move your system clock forward and backward to test expiration detection. Use the Reset Product Licenses item under the Product menu to remove all alias files from a PC. This will have the affect of creating a clean test machine.  

Pros and cons of the different location options

Auto-create in the registry

This will create the license files in a system location, which all users on the machine will have access to. In most cases, this is the recommended option since one activation will activate all users of that machine. The system locations will require that proper permissions are set when the license and alias files are opened to avoid an error due to the UAC. Note the section about Aliases and permissions below for more information.

Auto-create in the application folder

Similar to the above option, but the difference is that the main license file will be easily accessible in the application folder. If the user tries to copy/delete/modify the license file, the alias files will restore it to its proper state. Although you can't create the license file wherever you want , this option can be useful if you want to tie it to the application folder location. Note the section about Aliases and Permissions below for more information about the UAC issue.

Auto-create in the current user registry

This will create the license file and aliases to that they are only available to the current user. This bypasses the Alias and permissions UAC issue described below, but also requires that each user activate the software separately on the same machine. You would want to choose this option when installing a ClickOnce application.

Pre-create in the application folder

This allows you to create a license file to be distributed with your application. Your protected application expects to find the license file in the same folder as the application itself. If you do not have a license file in the same folder as your application, you will get an Error 15 which means the license file could not be found.

Aliases and permissions: Windows User Account Control (UAC)

Starting with Windows Vista and later, the UAC helps improve the security of Microsoft Windows by limiting application software to standard user privileges until an administrator authorizes an increase or elevation. In this way, only applications trusted by the user may receive administrative privileges, and malware should be kept from compromising the operating system. In other words, a user account may have administrator privileges assigned to it, but applications that the user runs do not inherit those privileges unless they are approved beforehand or the user explicitly authorizes it.

The alias files must also be created/opened with administrative privileges when they are stored in System locations, otherwise user accounts will not be able to write to the alias files. If the alias files cannot be updated, then the protected application will not run. To avoid permissions issues with non-admin users, please view the Instant Protection PLUS 3 Wrapper Deployment topic or the Instant Protection PLUS 3 DLL Deployment topic.

Reading and updating a license file

It is possible to modify a license file with updated licensing information by using the Instant Protection PLUS 3 API.