Custom actions not properly saved when reopening project - 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!

mat_bruges
Posts: 33
Joined: Tue Mar 11, 2008 12:28 am

Custom actions not properly saved when reopening project

Hi,

I am currently evaluating Advanced Installer Enterprise 6.2 and have noticed some behaviour with custom actions that does not seem correct.

I have created a merge module that I intend to use later in a separate project. In this merge module I want to call the custom action on my .Net assembly, which is an assembly that is being installed in this module.

Issue 1: So I select "Install" in the InstallExecuteSequence and right-click "New Installed Custom Action". I select my .Net assembly, and it is added OK. But when I click the "..." speedbutton for the Action Data, I get the normal default custom action data dialog instead of the one for .Net properties.

If on the other hand I select "Install" in the InstallExecuteSequence and right-click "New custom action.. .Net Installer Class Action", I get the special .Net custom action data dialog when I click the button for this custom action. I prefer this dialog because it makes it easier for me to add custom data properties.

Issue 2: However, when I save my project and reopen it, both these custom actions now have the normal default dialog for specifying custom action data.

Issue 3: And more importantly, the text that was in the "Action Data" textbox is now blank!

Am I missing something obvious here, or is this a bug?

Thanks

Mat
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
I select "Install" in the InstallExecuteSequence and right-click "New Installed Custom Action". I select my .Net assembly, and it is added OK. But when I click the "..." speedbutton for the Action Data, I get the normal default custom action data dialog instead of the one for .Net properties.
This is because you are using an Installed custom action, not a .Net Installer Class Action custom action. Note that an Installed custom action will treat the assembly like a normal file.
However, when I save my project and reopen it, both these custom actions now have the normal default dialog for specifying custom action data.
And more importantly, the text that was in the "Action Data" textbox is now blank!
This is a bug in Advanced Installer and it will be fixed in the next version. Until then, the workaround is this:
- create a "Property set with formatted" custom action under the "Install" sequence
- set the "Property Name" field to mydotnetca (this is an example, you can use any name you want)
- set the "Formatted Text" field to:

Code: Select all

/LogFile= /ReqVersion=2.0.50727 /InstallType=notransaction /Action=Install "[#DevExpress.Data.v6.2.dll]" "[TempFolder]dotNetCustAct.dll_Config.xml"
- note that you need to configure this for your custom action
- create a "New Attached Custom Action" under the above custom action
- rename it to mydotnetca
- set the "Source Path" field to:

Code: Select all

C:\Program Files\Caphyon\Advanced Installer 6.2\custact\dotNetCustAct.dll
- note that this is the "dotNetCustAct.dll" file from the "custact" subfolder of the Advanced Installer installation folder
- make sure that the "Function Name" combo is set to "LaunchDotNetCustomAction"

If you want to run the .Net custom action only during the installation of the main package, please follow these steps:
- create a "Property set with formatted" custom action and schedule it above the other two custom actions
- set the "Property Name" field to INST
- set the "Formatted Text" field to [Installed]
- set the NOT INST condition for the custom actions you created before

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mat_bruges
Posts: 33
Joined: Tue Mar 11, 2008 12:28 am

Thanks for your reply.

That sounds like a very complex workaround. When can we expect the new release?

I have not got it to work yet. Where do I specify the name or location of the assembly that contains the custom action?

Also: I have 4 of these assemblies that contain custom actions for install and uninstall. Each of those are dependent on other assemblies that are being installed. Will this still work? Is the custom action going to find those other assemblies in the current path?

Thanks

Mat
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
When can we expect the new release?
The next version of Advanced Installer will be released next month (in April).
Where do I specify the name or location of the assembly that contains the custom action?
You select the assembly when you create the Attached custom action (like I explained in my previous post).

I recommend the you first try this with a MSI package because the .Net custom actions work as expected (to make sure that the assemblies are installed correctly and the custom actions runs as expected). If everything works, then you can use the same configuration in the merge module, adapting it using the workaround I mentioned.
Each of those are dependent on other assemblies that are being installed. Will this still work?
If an assembly requires other files and these files are installed by your package then you shouldn't have any problem with this. The only way to know for sure is to test this scenario.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”