An application can utilize multiple License Files. The first License File to be opened is referred to as the primary (or master) License File. Multiple synchronized backup copies, or Aliases, of this primary License File can be scattered throughout 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 your backup 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, one or more aliases are stored in the Windows Registry, and one or more aliases are stored in the Windows or Windows\System directory. The more creative you are in choosing your aliases, the more difficult it will be for a hacker to gain additional time with your demo.
There are two common modes for opening Aliases. The first is
LFALIAS_VERIFY_CHECKSUM + LFALIAS_FIND_RECENT +
LFALIAS_OVERWRITE_OLDER + LFALIAS_CREATE_MISSING
(equal to the value of 15) which will cause the most recent alias to be used and all older aliases will be overwritten. The second mode is simply a flag of 0 that will force all aliases to be overwritten with the data in the primary License File.
You ship your software on 5/1/99 at 4:00pm. A customer receives the file and installs on 5/3/99 at 2:00pm. All aliases will have 5/3/99 2:00pm timestamp in their last used fields. If they use the software for several days, the last used timestamp will follow. Once the software expires, if they attempt to completely remove the application and License File and re-install, the 5/1/99 date will re-appear. The aliases will be NEWER and will be restored, thereby prohibiting the user the opportunity to gain additional demo usage.
Bypassing Aliases During Development
While aliases can be a powerful tool when running on a customer 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. By default, LFEdit forces the Last Used Date and Last Used Time fields to be current when you save a License File. In addition, it removes the three (3) aliases created by EZ Trial. If you find that your License File aliases are preventing your desired test conditions, simply create a new License File in LFEdit and save it. If you are using custom License File aliases, you may need to manually delete them from your system or write a short utility program to do so.
Bypassing Aliases at Customer Site
It may be necessary, on occasion, for you to send a customer a new License File. Applications using aliases make this difficult because a License File with a date and time older than aliases already on the computer will be ignored. Because of this, the customer will need to exit your application and allow it to shut down. You can then create a new License File with current date and time (keeping in mind any time zone differences) and e-mail it to the customer. When they overwrite their primary License File with the one sent by you, it will overwrite the aliases since the date and time are more recent.