Custom action on repair - 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!

clive_bor
Posts: 48
Joined: Thu Mar 09, 2006 8:32 am

Custom action on repair

Hi,

We have a vbscript custom action; which deletes cache files, that we want to run on install, uninstall and repair if a property is set to "true".

We have placed the action under "RemoveFolders" with the following condition:
(PROPERTY~="true") AND ((Not Installed) OR (REMOVE="ALL") OR (Installed AND (NOT (REMOVE="ALL"))))
But it only works for the install and uninstall. The custom action does not run on repair, the installation log file states the following:
MSI (s) (80:8C) [14:53:34:433]: Skipping action: ClearCache (condition is false)
I have also tried different sequences as well as setting the Condition to true (so that it always runs) with no success; logs state that the condition is false.

Could you please advise.
Thank you
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Custom action on repair

Hello,

Better yet, can you please specify when you don't want the custom action to execute?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
clive_bor
Posts: 48
Joined: Thu Mar 09, 2006 8:32 am

Re: Custom action on repair

Hi,

Well we need to stop our application before we clear the cache which is currently happening in the CostFinalize, and we start the application again in InstallFinalize, so anywhere in between those which makes sense.
I figured RemoveFolders made the most sense and placed it there for now.

Does it make a difference though? Because the install log states the condition for the custom action is always false.

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

Re: Custom action on repair

No, I wasn't very specific in my post.
that we want to run on install, uninstall and repair if a property is set to "true".
If you mentioned you want to run it on install, uninstall and repair, you don't want it to execute on an upgrade operation or when more exactly?

I am asking because it's easier to set a negated condition.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
clive_bor
Posts: 48
Joined: Thu Mar 09, 2006 8:32 am

Re: Custom action on repair

Hi,

We require the custom action to run on install, uninstall, repair and upgrade if the property is set.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Custom action on repair

Hello,

In this case it's enough to have the following settings for your custom action:
condition.jpg
condition.jpg (6.83 KiB) Viewed 8588 times
All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
clive_bor
Posts: 48
Joined: Thu Mar 09, 2006 8:32 am

Re: Custom action on repair

We are still using an old version of Advanced Installed (6.4.1) so we don't have those convenience options for the custom action conditions. But I downloaded the latest version and tested with that.
It still does not work when running a repair using the following command line:

Code: Select all

msiexec /f testpropertyaction.msi TEST=true /l*v install.log
I have replicated it in a simple example using a ScriptInline with a MsgBox.
The install log still states that the condition is false; and I have set the condition as per your recommendation.

Is there something I'm missing?

Please find example project attached.
Thank you
Attachments
testpropertyaction.aip
(8.64 KiB) Downloaded 383 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Custom action on repair

Hello,

It seems the repair msiexec command option doesn't allow setting properties.
You can try the following command line to achieve the same effect instead:

Code: Select all

msiexec /i testpropertyaction.msi TEST=true REINSTALL=ALL REINSTALLMODE=pecms /qb /l*v install.log
If you need to set the REINSTALLMODE property, here's the MSDN article to help you:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx

The same "Repair Options" are also briefly documented in our msiexec user guide article.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”