Custom Actions: C# dlls and customized licencing - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

RedDrago
Posts: 33
Joined: Thu Jan 19, 2012 9:23 am

Custom Actions: C# dlls and customized licencing

Hello,

I'm in some trouble now. I just can't get any Dll I create, to work with the Custom Actions.

First what do I want to achive?

In our old Installer solution with the Wise installer, we first install the application and then validate the license keys of our customers.
After that is done, the customer has to run the same installer again, so that it can install the missing databeses and modules.

Now with advanced Installer we want to create a Dialog, which validates the license keys of the customer in the very beginning. I could use the integratet licensing feature with my own Dll to veryfy the keys. But I do not wish to run the installer twice. I need to decrypt the Keys with my Dll and depending of the returned values, I need to install the required modules.

For the first try, I made a Dll, which should fit the requirements of a ".NET Installer Class Action". The Dll has a static class and a class whitch inherits from System.Configuration.Install.Installer and has the attribute "RunInstaller(true)". But when ever I add the Dll to the project, I can't even select a single method as an entrypoint. On top of that, it does not look like i can provide the required data for the parameters of the methods in the Dll. The only point where that seems to be possible is during the installation process but that is way to late because I also have to verify the Keys.

Is it even possible to use a c# dll with AI?
If yes, how do I have to declare the methods and classes, so that they are available as an entrypoint?
And what do I have to do so that I can read and alter the values of the install parameters?

I did take a look into your User Guide, but it did not really help me in this case...

Tobias
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Custom Actions: C# dlls and customized licencing

Hi Tobias,

A ".NET Installer Class Action" uses a .DLL from the package. It cannot be included as an UI Custom Action because at that point none of the resources from the package are copied to the target machine.
I believe this is the user guide article you are looking for.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
RedDrago
Posts: 33
Joined: Thu Jan 19, 2012 9:23 am

Re: Custom Actions: C# dlls and customized licencing

Hello Mihai,

thank you for the link. I didn't see that part of the guide.

Tobias

Return to “Common Problems”