randomguy123
Posts: 3
Joined: Mon Oct 16, 2017 8:46 am

Problems using Trial and licensing support for Electron app

Mon Oct 16, 2017 9:08 am

I have an application built on the electron framework which runs on html, css, and JavaScript. There is a problem as the application is still accessible even after the trial period expires. I'm aware that there needs to be some configuration done with the trial.dll file that is generated. I've gone through the tutorials, and came across the custom actions option..where I'm able to execute a script in JS. But I'm not sure what needs to be executed in the JS script. And also, all the tutorials were for C#, .NET and Java applications, so initializing the trial and licensing support is more confusing. It would be helpful if there were specific instructions as to what needs to be done for this issue. Thank you.

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

Re: Problems using Trial and licensing support for Electron app

Tue Oct 17, 2017 1:43 pm

Hello and welcome to our forums,

We do not have any sample about how to integrate electron apps with our trial DLL (this is a Windows native dll), but basically all yo should do will be to call from your app code our trial.dll functions:

1. call the "ReadSettingsRetStr" function when your application initializes to initialize our trial module too
2. call the "DisplayRegistrationStr" function when you need to display the registration dialog

Have a look on the "How can I use a C++ library from node.js?" thread which could be useful for you.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

randomguy123
Posts: 3
Joined: Mon Oct 16, 2017 8:46 am

Re: Problems using Trial and licensing support for Electron app

Wed Oct 18, 2017 1:21 pm

So, I tried the things you mentioned using python on a command line. The functions execute as expected, but the message is always "Trial has expired" when I try to initialise the licensing support, even after uninstalling and installing the application multiple times. And the GetPropertyValue function always returns 5 for every property. Could this be problem with the way we are specifying the Licensing parameters? Or is it something else?

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

Re: Problems using Trial and licensing support for Electron app

Tue Oct 24, 2017 12:29 pm

Hello,

Please make sure that you use our trial.dll module only after it is installed by your setup package. You should not manually copy it alongside your application file and test it. The trial.dll module should be always deployed by a setup package built with Advanced Installer. This is because when installing the setup package there are trial resources installed and configured on target machine.

Also, for testing purposes we always recommend to be used virtual machines with clean states so that when something goes wrong you can easily revert to a clean state of the virtual machine.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

randomguy123
Posts: 3
Joined: Mon Oct 16, 2017 8:46 am

Re: Problems using Trial and licensing support for Electron app

Wed Oct 25, 2017 9:46 am

Yep it works when it is run from within the application. Thanks for your help!

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

Re: Problems using Trial and licensing support for Electron app

Thu Oct 26, 2017 10:08 am

You're always welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”