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

StackOverflow https://stackoverflow.com/questions/22371290

Question

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.

Était-ce utile?

La solution 2

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.

Autres conseils

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

+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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top