oviradoi
Posts: 5
Joined: Fri Aug 26, 2016 8:16 am

Can't read licensing properties after trial has ended

We're trying to use Advanced Installer licensing for our application, and we want to implement a custom UI for the trial dialog in order to fit in better with our app's look and feel.

The licensing scheme we want to use includes computer-specific licenses, so we need to read the computer id using GetPropertyValue("CompId").
This works fine before the trial period expires, but after it expires, we can't read the computer id anymore.

The error we get is 5 (ERROR_ACCESS_DENIED), which indicates that we must call ReadSettingsStr first. The problem is that when we call ReadSettingsStr, it fails because the trial period has ended.

This problem will prevent our users from requesting a license after their trial period ends.

Is there any way to read the computer id after the trial period has ended?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Can't read licensing properties after trial has ended

Hi,

Sorry for the delayed reply.

Can you use the "ReadSettingsRetStr" function instead of the "ReadSettingsStr" one and see if it works?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
oviradoi
Posts: 5
Joined: Fri Aug 26, 2016 8:16 am

Re: Can't read licensing properties after trial has ended

I have tried using ReadSettingsRetStr to initialize the licensing library. It returns 5, which indicates that the trial has expired.

After that, if I call GetPropertyValue with any value, it will also return 5, and it won't read any properties.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Can't read licensing properties after trial has ended

Hi,

Normally, the Computer ID can be retrieved when the "Register" button from the trial dialog is used. Do you want to implement another scenario? If so, can you give me more details about how you want to get the Computer ID and why?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
oviradoi
Posts: 5
Joined: Fri Aug 26, 2016 8:16 am

Re: Can't read licensing properties after trial has ended

As I said in my first post, I am trying to implement my own trial/registration dialog, in order to better fit in with the look and feel of the app.

This is why I set the "Display frequency percent" to 0, in order to make the Advanced Installer dialog not show up at all, and instead show my own dialog.

Inside my own dialog, I want to call the functions in the dll provided by advanced installer and retrieve the computer id.

The whole functionality is working fine, the only problem is that I can't read the computer id after the trial period expires.

Here are some reasons why I want to implement a custom dialog and not use the one provided by Advanced Installer:
  • Better fits in with the look of the application
  • I can translate the dialog easier
  • You provide examples on how to modify your dialog to have a "copy to clipboard" button, or a "send by email" button. I can implement both options, so the user can choose if he wants to copy the request to the clipboard or send it using the default email client.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Can't read licensing properties after trial has ended

Hi,

Thank you for the details.

Indeed, it is not possible to access the Computer ID from a custom trial dialog when the trial has expired. I added this improvement on our TODO list and it will be available in a future version of Advanced Installer. Thank you for your suggestion.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
oviradoi
Posts: 5
Joined: Fri Aug 26, 2016 8:16 am

Re: Can't read licensing properties after trial has ended

Thanks for the reply. I will keep an eye out for this feature so I can use it when it gets implemented.

I think you should also implement reading some other properties after the trial has expired, like TrialName, LicReqContact, BuyUrl.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Can't read licensing properties after trial has ended

You're welcome.

We will add access to those properties, too. We will update this thread when the improvement will be available.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: Can't read licensing properties after trial has ended

Hello guys,

This improvement has been added in version 16.5 of Advanced Installer, released on November 13th, 2019.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”