Using USB Flash Drives as Software License Dongles
When it comes to selling software, it pays to be creative. You create opportunities
by giving your customers plenty of options, so they can buy and use your products
in ways that work best for them. Take the sample ad above as an example. WidgetX
is available as a download, on CD, and on a USB flash drive. For a customer
who wants to be able to use the program on multiple computers (one instance
at a time), the flash drive for an additional $100 is an attractive option.
With SoftwarePassport/Armadillo, you can hardware lock keys to native USB flash drives, so that your protected program will only work when the specific drive, or dongle, is inserted into the computer the customer is using. Here's how:
Decide how you will select the USB drive for hardware locking. (See Selecting
a USB Drive for Hardware Locking below.) Depending on that decision, you
may need to take additional steps, such as configuring your program to assign
the lowest-available drive letter to the dongle.
In the ARM file for protecting your program, go to Project Settings>Enhanced
Hardware Locking and select Native USB Key.
When you're finished setting up the ARM file, protect your program.
Arrange for your installation to include Armadillo's au32v10.dll (or au64v10.dll,
for 64-bit programs) in the same directory as your protected program, or somewhere
on the path. This will allow Armadillo to retrieve the serial number of the
dongle.
Provide your customer with an unlicensed dongle, and an installer for your
program.
Instruct your customer to insert the dongle into the target machine, and
then install and launch your program.
Have your customer send you the hardware ID shown in the program's Enter
Key dialog.
In the ARM file for protecting your program, use the customer's hardware
ID to create a key.
Send the key to your customer for use in registering the program, which
will hardware lock the key to the dongle.
The customer can then install and use your program on any computer, as long
as the licensed dongle is inserted.
Notes:
Not all USB drives provide serial numbers, and even those that do might
not provide unique ones.
If the program can't get a valid serial number for some reason, it will
display all-question-marks instead of a hardware fingerprint.
The RawFingerprintInfo function, in ArmAccess.DLL, has a USB-related setting
for the "item" parameter. A value of 10 will provide a hash of the
native USB serial number, if and only if the project's hardware locking is
set to use native USB. The RawFingerprintInfo function is described in the
separate API help file.
This option does not check to see whether the USB device is removed after
the program is started. To accomplish this, you can set up your program to
periodically check the KEYDEVICEREMOVED environment variable. Remember to
call the UpdateEnvironment function in ArmAccess.DLL first. For information
on KEYDEVICEREMOVED and UpdateEnvironment, see the
separate API help file.
Selecting
a USB Drive for Hardware Locking
When your customer opens the Enter Key dialog in your protected program, the hardware fingerprint displayed there will be for a specific USB device on the target machine. The rules that your program follows for selecting the USB device are as follows:
If the drive that the program is running from has a USB serial number, it
will use that drive.
If the above test fails, it will select the lowest-lettered USB drive that
offers a serial number.
If it can't find any USB drive with a viable serial number, it will display
all-question-marks.
Once a native USB hardware-locked key is installed, the program will check the serial numbers of every USB drive with a drive letter in the system, so as long as the USB drive that it's locked to is plugged into the system and has a drive letter, the program will find the drive and recognize the key.
Purchase / Download
Mac developers SoftwarePassport Mac Environment Windows developers SoftwarePassport Windows Bundle SoftwarePassport Win32 Environment SoftwarePassport Win64 Environment SoftwarePassport Corporate Edition Supporting Products Key Generator Language Strings