Custom Actions are skipped - Advanced Installer Community
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Custom Actions are skipped

My installer finds its install location based on two properties in the registry which could be in two different location. I set two variables with these values according to this earlier question

http://www.advancedinstaller.com/forums ... =5&t=26338

I have two different custom actions that set up two different paths (for two different components of the install). The first one works but the second one does not. The only difference that I can see is that the first one that works points to a location in the registry that is a complete path. e.g. it points to c:\program files\myapp\loc1\. The other one points to a location that exists but then for the value we add on a subdirectory e.g. it points to c:\program files\myapp\ and we add on the "loc2" so that it ends up being c:\program files\myapp\loc2

When I look at the log file it says skipping actions loc2 and then doing action loc1.

The action's condition is the result of the search. I would like to know if it is possible to see the value of this search. I understand from the AI documentation that if the search cannot find the path then it returns null. I assume that if the value is null then the custom action evaluates the condition as false.

Any insight would be really helpful. I am using v11.6.1 of AI.

Thanks

David
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Custom Actions are skipped

Hi David,
I understand from the AI documentation that if the search cannot find the path then it returns null. I assume that if the value is null then the custom action evaluates the condition as false.
Yes, this is correct.
The action's condition is the result of the search. I would like to know if it is possible to see the value of this search.
The search operations defined in the Search page are executed during the AppSearch standard action. If you create a verbose log, you should be able to see the value of the property assigned to the search operation.
So, if the search is successfully, the you will see something like that in the log:

Code: Select all

MSI (c) (98!C8) [10:30:35:305]: PROPERTY CHANGE: Adding RESULT_PROPERTY property. Its value is <path to your file>.
where:
RESULT_PROPERTY is the property assigned to the search operation.

Note that you can search in the log file using as a keyword the name of your search operation defined in the Search page of Advanced Installer.

If the file does not exist, you should not see the above line in the log.

Let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Custom Actions are skipped

Thanks for that information. So it does find the path in the registry as the variables are being set. I can only assume that there must be an issue with the custom action in that case. It says that the condition is false.

Looking at it in more detail, it looks like I gave the search variable the incorrect name in the condition box. It was similar but slightly out. The validate button said it was valid anyway which threw me a bit.

Now that I have changed the condition so that it gives the exact value for the search it works.

Thanks for your help.

David
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Custom Actions are skipped

You're welcome David,

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”