fkus
Posts: 27
Joined: Fri Jan 04, 2019 7:38 pm

InitTrial killing application if trial is expired

Hello,

I am having an issue with the InitTrial killing my application without warning or notice if the trial is expired.

I have designed my own window for registering the license (so that I can provide the user with supplemental information), and it works great if the application is within the trial limit or if the product is already registered. The issue is that when the call to InitTrial is run, the application just stops.

Code: Select all

[DllImport("Licensing.dll", EntryPoint = "ReadSettingsStr", CharSet = CharSet.Ansi)]
private static extern uint InitTrial(string aKeyCode, IntPtr aHWnd);
Is there an alternate method to register the trial library and inform the user that the trial is expired?

Thanks,

Francis
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: InitTrial killing application if trial is expired

Hello Francis,

This happens because you are using the "ReadSettingsStr" function of our trial dll. To avoid this behavior please use the "ReadSettingsRetStr" function instead.

Hope this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fkus
Posts: 27
Joined: Fri Jan 04, 2019 7:38 pm

Re: InitTrial killing application if trial is expired

Hi Daniel,

This solves the problem of the application closing without warning, thanks!

However, I now have another problem. When the trial is expired I cannot access the computer ID. Currently, I am using the following code:

Code: Select all

public bool tryGetMachineID(out string machineID)
{
    return tryGetProperty(@"CompId", out machineID);
}

private static uint getProperty(string propertyName, StringBuilder val, ref uint len)
{
    return GetPropertyValue(propertyName, val, ref len);
}

[DllImport("Licensing.dll", EntryPoint = "GetPropertyValue", CharSet = CharSet.Unicode)]
private static extern uint GetPropertyValue(string aPropName, StringBuilder aResult, ref uint aResultLen);
This snippet works fine if the application is within the trial period or if the application is licensed.

From what I understand reading this article, there are two strings I can use to get the computer ID from the GetPropertyValue call: "CompId" and "COMP_ID". My understanding though was the the later, "COMP_ID", was only valid if the license is registered, while the former, "CompId", should always be valid. Am I missing something here?

Thanks for the help,

Francis
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: InitTrial killing application if trial is expired

Hello Francis,

Unfortunately, this is caused by a limitation in Advanced Installer. You can not access the ComputerID property from a custom dialog, after the trial period expired. We already have this improvement on our TODO list and hopefully it will be available in a future version of Advanced Installer. I have also increased its priority in our reporting system.

I'm afraid that the only workaround for this is to use our predefined trial dialog.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fkus
Posts: 27
Joined: Fri Jan 04, 2019 7:38 pm

Re: InitTrial killing application if trial is expired

Hi Catalin,

Thanks for the response. Is there a way I can view issues in your backlog/get a notification when the issue is resolved/in an upcoming release? This is a pretty important feature.

Thanks,
Francis
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: InitTrial killing application if trial is expired

Hello Francis,

Unfortunately, there isn't any way in which you can view the status of this. However, I will update this forum thread as soon as this will be implemented. If you want to, I can also notify you by e-mail, so you can be sure that the notification reaches you.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fkus
Posts: 27
Joined: Fri Jan 04, 2019 7:38 pm

Re: InitTrial killing application if trial is expired

I would very much appreciate it Catalin.

Thanks for the excellent service,

Francis
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: InitTrial killing application if trial is expired

You are always welcome, Francis.

Always glad to help.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fkus
Posts: 27
Joined: Fri Jan 04, 2019 7:38 pm

Re: InitTrial killing application if trial is expired

Hi,

Any progress on the issue accessing the ComputerID from a custom dialog after the trial period has expired? This is a major concern for our use case of Advanced Installer and an update would be appreciated.

Thanks,
Francis
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: InitTrial killing application if trial is expired

Hello Francis,

Unfortunately, this has not yet been implemented.

However, I have increased its priority and hopefully this will be added in a future version of Advanced Installer.

As for this moment, I am afraid I can not give you any estimation on when this will be implemented.

Thank you for your understanding.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fkus
Posts: 27
Joined: Fri Jan 04, 2019 7:38 pm

Re: InitTrial killing application if trial is expired

Hi,

Any update on this issue? Not being able to read the MachineID with an expired license is severely hindering my use of the Installer as I've had to create my own work-arounds that are only partially effective, and negatively impact the security of my application.

As it stands, my maintenance plan expired and I don't see any value in renewing it until this issue is solved. Hope it comes sooner rather than later!

Francis
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: InitTrial killing application if trial is expired

Hello Francis,

Unfortunately, this improvement has not yet been implemented.

I have forwarded your feedback to the developer in charge of adding this improvement and I also increased its priority once again in our improvements tracking tool.

I will update this thread as soon as this will improvement will be implemented.

Thank you for your understanding.

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

Re: InitTrial killing application if trial is expired

Hello Francis,

I am happy to announce you that we have implemented this improvement.

Please send me an e-mail at support at advancedinstaller dot com if you are interested in a quick fix (until the release).

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

Re: InitTrial killing application if trial is expired

Hello Francis,

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”