Reputation: 10660
I have an msi installer which i have created using wixtoolset.
Now what I am trying to do is to configure some settings of my app just in the moment I launch the msi installer by passing some parameters to it so my app is going to be installed with those settings by default. In this way i can deploy my app with features a,b,c to a user and with some other features d,e,f to another user.
I need to distribute/roll out my application to multiple computers, so I need to do a silent/unattended installation without user intervention.
I have heard that passing parameters (custom actions) to the msi installer do not work in silent/unattended installations so how can I achieve this?
Upvotes: 0
Views: 432
Reputation: 55620
This is a very broad question. Your title says settings but your question mentions features. Windows Installer has a property called ADDLOCAL which can be used to set which features to install.
msiexec /i foo.msi ADDLOCAL=ALL /qn <- install all features silently
msiexec /i foo.msi ADDLOCAL=A,B,C /qn <- install features A B C silently
This is only way way to do it. There's all the INSTALLLEVEL property and feature conditions. Also if your talking settings your typically talking about secure custom public properties like
Then maybe in a registry value you use [SERVERNAME] to populate a registry value with the value of SERVERNAME.
msiexec /i foo.msi ADDLOCAL=A,B,C SERVERNAME=myserver /qn
Also be aware of mainteance mode (change) it's possible to add and remove features
msiexec /i foo.mai ADDLOCAL=A,B,C REMOVE=D,E,F /qn
Finally be aware that MSI doesn't persist properties (like SERVERNAME) so if you install with one value and do a repair it can get nulled out. For this google Wix Remember Property pattern for examples of how to use a Registry Search to fetch the property back from the registry.
Upvotes: 1