check if valid license during app install (by app once running is too late)



  • Official comment
    Soraco Technologies

    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 Permalink
  • Avatar

    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 ?


    Comment actions Permalink
  • Avatar
    Soraco Technologies


    1. I would have the user trigger the upgrade from the application currently installed - this way you already know there's a license.

    2. If the user cannot trigger the upgrade from the application, then either options you mentioned would work.

    Comment actions Permalink

Please sign in to leave a comment.