Monday, August 18, 2008

Passign Parameters to CustomAction

How to Pass Command Line Arguments to MSI Installer Custom Actions

Install the application without user intervention and full logging:

setup.msi /qb /l* log.txt MyCustomParameter=one MyOtherCustomParameter=two

Uninstall the application without user intervention:

msiexec /x {13F62DF0-E078-45C8-B0FB-185D307DB500} /qb


If you use the logging switch on the command line, and then run the setup:
setup.msi /l* c:\setup.log

You will see a list of parameters in the log file. You can specify any of these on the command line:
setup.msi /i <parameter>=<value>

And those should pass into the dialog boxes. I believe the command line you should use would be:
websetup.msi TARGETVDIR=MyVirtualWebSiteDirectory

No comments: