Time Limmited Trial Version C++ - Advanced Installer Community
obartolomep
Posts: 12
Joined: Tue Jan 19, 2016 10:44 am

Time Limmited Trial Version C++

Hello,

I want to create a time limmited trial version for my application proggramed in C++.
I've used the template you provide for this language and I've followed the instructions to create the trial version with advanced installer.
It all goes allright, but I wonder how to change something. First appears the window advertising the time left for the demo version and then a window to write the serial number to register the application. How could be made a demo version that only shows the time left without the register window? I only want a demo version time limmited that cannot be used when the time is over.

Thanks a lot.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Time Limmited Trial Version C++

Hello and welcome to our forums,

To achieve what you want you could try to create your own trial dialog. Please take a look on the "Advanced Installer using my custom form for trial.dll" thread exposing a method how this can be done.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
obartolomep
Posts: 12
Joined: Tue Jan 19, 2016 10:44 am

Re: Time Limmited Trial Version C++

Hello,

thanks for the quick reply.

Now I'm making my own trial days left window. I'm using the "GetPropertyValue" template for the "TrialLeft" property:

Code: Select all

...
typedef UINT (__stdcall * GetPropT)(LPCWSTR, LPWSTR, DWORD *);
...
GetPropT getPropFct = reinterpret_cast<GetPropT>(::GetProcAddress(hModule, "GetPropertyValue"));

CStringW licID;
DWORD len = licID.GetAllocLength();
if ( ERROR_MORE_DATA == (getPropFct)(L"TrialLeft", licID.GetBuffer(), len) )
{
  (getPropFct)(L"TrialLeft", licID.GetBufferSetLength(len), len)
}
I would like to know which value tells me the days left for the trial because I don't find it.

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Time Limmited Trial Version C++

Hello,

The left days number should be written in the "licID" variable. However, please note that before calling the "GetPropertyValue" function you should make sure you have first initialized the trial module by using the "ReadSettingsRetStr" function.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
obartolomep
Posts: 12
Joined: Tue Jan 19, 2016 10:44 am

Re: Time Limmited Trial Version C++

Hello,

You're very helpful! The problem was that licID had a '1' value instead '30', but I have deleted the trial, created again and rebuit the project, and know licID shows the correct value.

Thanks a lot.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Time Limmited Trial Version C++

You're always welcome.

This may happen if you performed multiple installation tests with your previous trial item you added in "Licensing" page. Please note that even after uninstalling the product the trial info still remains on user machine.

For testing purposes, when you want to remove the trial info from current machine, you can open your setup project in AI and go to "Licensing" page, select your trial item and from its context menu choose "Testing -> Remove Trial Info" option.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
obartolomep
Posts: 12
Joined: Tue Jan 19, 2016 10:44 am

Re: Time Limmited Trial Version C++

Hello,

now I have another problem. Finally I made my own trial dialog following the tutorial steps (Display frecuency percent to 0 and don't show the trial message at first run and c++ templates). It all works fine, but now I want to allow the user to request a trial period extension inserting a code. I've activated this option in the trial options menu but, after the trial period finishes, it doesn't appear any dialog to insert the code. Does this dialog depend on the "Display Frecuency Percent Option"? Is there any template or variable to catch the extension code in C++ language?

Thanks in advance.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Time Limmited Trial Version C++

Hello,

I'm afraid you cannot achieve what you want using your own trial dialog; we don't have support for this. The trial extension dialog can be displayed only from our main trial dialog which appears only when the display frequency is higher than 0. We have added this improvement in our TODO list and maybe it will be considered in a future version of Advanced Installer. Thank you for your suggestion.

Until then, I'm afraid you have to use our default trial dialog if you need to use the trail extension feature. Thank you for your understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
obartolomep
Posts: 12
Joined: Tue Jan 19, 2016 10:44 am

Re: Time Limmited Trial Version C++

Thanks a lot.

I'll think about an alternative.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Time Limmited Trial Version C++

You're welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
obartolomep
Posts: 12
Joined: Tue Jan 19, 2016 10:44 am

Re: Time Limmited Trial Version C++

Hello again,

finally I've decided to use the advanced installer demo dialog for my application.

I want a time limited demo version that can be time extended with codes. I have activated this option. In the first run, the time remaining dialog apears, then the dialog to insert the serial number. I have inserted the serial number, then the application runs ok. But when the demo version period expires, the demo dialog saying that the time has expired or the dialog to insert the time extension code do not appear and the application runs as if it was the complete version.
Any help, please?

Thanks in advance.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Time Limmited Trial Version C++

Hello,

Can you please test the installation setup on a clean machine and see if the behavior still persists? 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.

Also, please try to set the "Display Frequency Percent" field to 100 and see if this is of any use.

If you could isolate the behavior in a buildable sample (AIP + all of its referenced files) this will be very useful for us.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
obartolomep
Posts: 12
Joined: Tue Jan 19, 2016 10:44 am

Re: Time Limmited Trial Version C++

Hello,

thanks for the response. I've tried in a clean machine, but it happens again. It seems that when you enter the serial number, the demo version turns into the complete version. I already had the Display frecuency percent at 100.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Time Limmited Trial Version C++

Hello,

I've tested the scenario but I cannot replicate the issue. Please send us the .AIP (project file) to support at advancedinstaller dot com alongside a detailed step by step test case which we can follow to replicate the behavior.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
obartolomep
Posts: 12
Joined: Tue Jan 19, 2016 10:44 am

Re: Time Limmited Trial Version C++

Hello again,

maybe I didn't understood well the Trial Extension and registration development.
I want to create a time limited trial with the possibily of trial extension. I activate the trial extension option, but when the trial time expires theres is no place to enter the extension code. Just the registration option window appears. How can I make the extension code window appear?

Thanks in advance.

Return to “Common Problems”