Re: Install CustomAction does not run when /PASSIVE passed at commandline
On Sep 14, 5:39*pm, livingstone <livingstone_a...@yahoo.com> wrote:
> I have authored MSI installer with VS9 Setup and Deployment project.
> My MSI includes Install and Uninstall custom actions. This MSI always
> gets deployed with /PASSIVE passed in.
>
> My problem is that install custom actions don't always get executed
> when running the MSI for the second time (running the MSI after it had
> already been installed). Whether install CAs get executed or not seems
> to be affected by /PASSIVE parameter passed at command line. I am
> looking at these two scenarios:
>
> Scenario #1:
> Run the MSI for the second time by double clicking the MSI. Repair/
> Remove dialog comes up. Selecting Repair (which happens to be default
> button) will result in install CAs execution, as desired.
>
> Scenario #2:
> Run the MSI for the second time but this time from the command line:
> * * * * msiexec /I Something.MSI /PASSIVE
> In this scenario my install custom actions are NOT executed. I would
> like to change this behavior.
>
> I should mention that install CAs do run OK when executing the MSI for
> the second time from the command line without /PASSIVE parameter:
> * * * * msiexec /I Something.MSI
>
> I have tried tried changing Condition for my Install CA (to force CA's
> to run no matter what) to:
>
> NOT Installed OR Installed OR
> MaintenanceMode="Repair" * * * * (Install CA still didn't run in
> scenario #2)
> NOT Installed OR Installed OR
> MaintenanceMode="Modify" * * * * (Install CA still didn't run in
> scenario #2)
> NOT Installed OR Installed OR MaintenanceMode=?Repair? * * * *(this
> causes runtime error)
> NOT Installed OR Installed OR MaintenanceMode=?Modify? * * * *(this
> causes runtime error)
>
> I should probably also mention that my MSI has these settings:
> DetectNewerInstalledVersion=True
> RemovePreviousVersions=True
>
> Any help will be greatly appreciated!
Hi,
The problem you have is that in scenario one you're using the UI to
put the MSI into maintenance/repair mode. In scenario two you're
effectively trying to install a product that is already installed.
This won't just not run the CAs, it won't actually do anything.
The question I would have is, why are you trying to install the
application passively over the top of an existing install? Are you
trying to repair? If so you should run the following command line:
msiexec /f <path to msi> /passive
If you want to ensure that the Install CAs run no matter what
(presumably during repair as well?), you should condition them using
REMOVE<>"ALL". This covers off every scenario except uninstall.
Hope this helps.
Cheers,
Loz
|