tslewis
Posts: 65
Joined: Wed Mar 13, 2013 7:06 am

Cannot Pass User defined Parameter in .NET Custom Action

I have successfully set up a custom action .NET class following the tips at http://devcity.net/Articles/339/3/article.aspx

I am able to successfully launch and DEBUG the custom action when building the Installer from the Advanced Installer GUI.

I am unable to pass a user defined custom action parameter to the custom action. The parameter is called "pluginfolder" say that is assigned the value of a user defined search parameter [PLUGIN_PATH] obtained from a Search on the Registry for a particular key.

I have tested the search in the Advanced Installer GUI and it retuned the correct value for [PLUGIN_PATH] prior to running the installer.

As a test I assigned a defined string value of "test" to the custom action parameter "pluginfolder"

in DEBUG, when I use the Context.Parameters("pluginfolder") it correctly returns the value of "test". Hence I am able to correctly pass some parameters correctly and the problem has to be that I cannot pass a value of [PLUGIN_PATH}. Is this a limitation of Advanced Installer? I cant believe so as it would be pretty pointless if you cant pass such parameters obtained form a Search. Im presuming a Search is Carried out before the custom action? Is there a watch widnow to monitor custom parameters as it is building/debugging?

I am using VS2012 Pro, .NET 4.0, VB.NET and Advanced Installer 10. I am trying to install a 32 but assembly on a windows 7 x64,

cheers
tslewis
Posts: 65
Joined: Wed Mar 13, 2013 7:06 am

Re: Cannot Pass User defined Parameter in .NET Custom Action

Does anyone have a suggestuon? Still cant resolve this..
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Cannot Pass User defined Parameter in .NET Custom Action

Hi,
Is this a limitation of Advanced Installer? I cant believe so as it would be pretty pointless if you cant pass such parameters obtained form a Search.
No, this is not a limitation. The value of an installer class parameter supports formatted text, so your [PLUGIN_PATH] property can be passed as a value for your parameter.
Im presuming a Search is Carried out before the custom action?
In the Custom Actions page the "Installation Sequence" pane displays the order the actions are performed. By default the searches are performed first.
Is there a watch window to monitor custom parameters as it is building/debugging?
You can use the "Run and log" option to monitor the installation of your application.

Also, as a test you can use a property created by you in the Install Parameters page instead of the [PLUGIN_PATH] search property, to see how it behaves.

If the problem persists can you please send us the .AIP (project file) and a verbose log of the installation so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tslewis
Posts: 65
Joined: Wed Mar 13, 2013 7:06 am

Re: Cannot Pass User defined Parameter in .NET Custom Action

Yes problem persists and i have spent two wasted days trying to debug this. I sent you an email last night with aip file attached, no response
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Cannot Pass User defined Parameter in .NET Custom Action

We checked our emails, but unfortunately we didn't find any email related to your problem. Can you please tell us the email address you send it from so we can try to search for it in our junk folder or even resend your email again?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Cannot Pass User defined Parameter in .NET Custom Action

Hi,

We received some emails from the address you specified above between 16 to 21 March, but they are not related to the problem you mentioned in this thread. Can you please verify that you successfully sent the email to support at advancedinstaller dot com and try to send it again?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tslewis
Posts: 65
Joined: Wed Mar 13, 2013 7:06 am

Re: Cannot Pass User defined Parameter in .NET Custom Action

Yes I sent a few emails before with the same email address discussing licensing issues and a problem with editing text on a dialog box, I have resent the email again today with the custom user action solution in VS2012 format. I have also attached the aip file here. I really need to resolve this and have been struggling for several days, thanks for keeping in the loop

cheers
Attachments
Setup.aip
(35.14 KiB) Downloaded 350 times
tslewis
Posts: 65
Joined: Wed Mar 13, 2013 7:06 am

Re: Cannot Pass User defined Parameter in .NET Custom Action

Eusebiu wrote:Hi,

We received some emails from the address you specified above between 16 to 21 March, but they are not related to the problem you mentioned in this thread. Can you please verify that you successfully sent the email to support at advancedinstaller dot com and try to send it again?

Best regards,
Eusebiu

My mail box has said that they went out correctly. I have resent again just now to:

'support@advancedinstaller.com'

Return to “Building Installers”