eeshwr
eeshwr

Reputation: 268

how to stop custom action from executing from parameters while installing msi throug command line.?

i have sucessfully installed my msi in silent mode using the following command.

msiexec /i mysetup.msi /qn ADDLOCAL=myfeature

Also, i have a custom action in my installsequence which is a gui for some configuration. And i dont want that gui appears while installing in silent mode. Is there any way to pass paramater while installing msi to skip the custom action . thanks in advance.

Upvotes: 1

Views: 2663

Answers (3)

Yan Sklyarenko
Yan Sklyarenko

Reputation: 32250

+1 for the answers of @Nimish and @taffit.

If you don't have the sources of the installation program, or you can't modify those, you can try a different approach:

  • open the MSI file in Orca and modify the condition of that custom action to 0

  • generate a transform and save it somewhere, e.g. as diff.mst

  • modify your command line like this:

    msiexec /i mysetup.msi TRANSFORMS=diff.mst /qn ADDLOCAL=myfeature

Upvotes: 1

taffit
taffit

Reputation: 2099

If you just want to pass parameters to the MSI so you can install it in silent mode with the given parameters you could add them as properties on the command line. These will overwrite the values of eventually defined properties in the Property-table in the MSI.
I.e. for setting the property MYPROPERTY to the value MyValue, add the following to the commandline:

msiexec /i mysetup.msi /qn ADDLOCAL=myfeature MYPROPERTY=MyValue

In your custom action just reference the property. If installed with GUI you can then set it in the GUI that your custom action provides.

Upvotes: 2

Nimish
Nimish

Reputation: 719

Put your custom action in InstallUISequence.The InstallUISequence is skipped during a silent installation.

Upvotes: 4

Related Questions