This solution shows how to implement a ‘usb key licensing’ without a webservice. The gloal is to send usb keys as license (like a hardware dongle with a standard storage pen).
This solution shows also how to embed a ‘full featured licensed’ and a ‘limited demo’ versions in a single executable.
ProgramToActivate : this is the dummy project to activate. It can be compiled as demo or full featured (the DEMO compilation switch turns the program into a demo version).
Preactivator : builds license keys from usb keys.
Building the solution
1. Export your keyset (from dotNet Protector’s menu Tools/Export Keyset) to the solution directory.
2. Rebuild preactivator
3. Protect preactivator, demo and lockedprogram (preactivator.dpp, lockedprogram.dpp projects respectively)
4. Run programtoactivate. It should run in demo mode.
5. Activate a storage pen with preactivator and copy the license file in the same directory as lockedprogram.
6. Run lockedprogram with the dongle attached. It should run in full mode. Remove the dongle. It should exit (savage process killing)
7. Run lockedprogram without the dongle attached. It should run in demo mode.