check if valid license during app install (by app once running is too late)
(I am using Advanced installer, but should be similar when using Wix or InstallShiedl)
What is the recommended way to test if a valid license is present during app install ? this test must be before anything is really installed
For sure several have faced that. Any example ?
What i particularly want to avoid is that the user install a newer version over/instead an old one, but then it does not validate because maintenance plan is expired (but his old version was working = prepare for the claim...)
Thx,
Fabrice
-
Official comment
To determine if a license is already registered on a system, do the following:
/ /Assuming you are using the LicenseValidator class generated by the QLM Protect Your Application Wizard
LicenseValidator lv = new LicenseValidator();
string storedActivationKey = string.Empty;
string storedComputerKey = string.Empty;lv.QlmLicenseObject.ReadKeys(ref storedActivationKey, ref storedComputerKey);
// If storedActivationKey or storedComputerKey are not empty, it means a license was already registered on this computer.
You can then call GetLatestEligibleVersion to determine if the user is eligible to the upgrade:
lv.QlmLicenseObject.GetLatestEligibleVersion (...)
Comment actions -
Hi John,
Yes this is the detailed step on the QLM level ... and thanks for that.
Sorry for my English ; my question was more "helicopter view = wider"
The problem is to do what you described, but before the new app is installed
I see two ways:
-#1 write a "mini-app", executed by the installer, that can run without install, that basically does what you wrote and respond to the installer
- OR #2 installer quering the previous version (that is installed) that tests what you said
(my view: I see #1 simplier to handle, outside of main app, but I fear that it is not possible without installing some dll & it's one more app where keys will be diseminated, and this code will be very short & simple to analyse)
--> your opinion or experience? or is there a smarter or simplier means ? or something extsisng already ?
F
Please sign in to leave a comment.
Comments
3 comments