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!

DuncanL
Posts: 12
Joined: Fri Oct 21, 2005 11:26 am

Modify property in Custom Action

Thank you for the assistance so far - you've been very helpful. I'm having trouble with Custom Actions and I hope someone can point me in the right direction because it's making me blow steam from my ears! :x

First I read a value into property from a registry key, via an the Search section.

If that property now has some content I need to modify it to add the Windows folder path to the start; so I add "Property Set with formatting" action to modify the property:
PLUGIN_DIR
[WindowsFolder][PLUGIN_DIR]

But no matter what Custom Action I put this into, it never happens. Logically it should go into AppSearch, but if custom actions happen before the msi's own (and I can't see anywhere in the help that says when Custom Actions happen with respect to the build in ones), then it could go into LaunchConditions or CostInitialise - but it make no difference.

I have tried adding ErrorMessages everywhere and they never happen either.

All that happens is I get a "Could not access network location" error during the CostFinalise phase because it is trying to reference the file using the partial pathname.

I'm probably doing something wrong, so I'm quite prepared for someone to point and go "it's easy"!

I hate to sound like I'm complaining but Advanced Installer seems to make everything much, much harder than it needs to be - I can do all this in seconds in our non-MSI installer product.
DuncanL
Posts: 12
Joined: Fri Oct 21, 2005 11:26 am

Profuse apologies for the multiple posts - an epic thunderstorm is causing the internet to go up and down like the Assyrian Empire... please delete the multiple copies.

Sorry again. :oops:
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

You get that error because you put the custom action only under "InstallExecuteSequence". You need to scheduled the custom action under both sequences (UI and Execute).

So add that "Property Set With Formatted" custom action under "InstallUISequence->AppSearch" standard action. Now drag this CA (while shift key is pressed) under "InstallExecuteSequence->AppSearch". Use "Execute only once if present in both sequence tables" as "Scheduling Options".

Let me know if you encounter any problem.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
DuncanL
Posts: 12
Joined: Fri Oct 21, 2005 11:26 am

Thank you - that seems to have solved that issue.

Is there a reason you need to include the actions twice? And could it be made more obvious in the help file please? :D
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
Is there a reason you need to include the actions twice?
Scheduling the custom action under "InstallExecuteSequence" is necessarily in case the package will run without UI. In this case the custom action from Execute sequence will be executed.

Using the drag method the custom action is not added twice, it's shared between sequences. Also note the "Execute only once if present in both sequence tables" scheduling option.

For more details about custom actions please see:
http://www.advancedinstaller.com/user-g ... -page.html
http://www.advancedinstaller.com/user-g ... rties.html

Kind Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”