Reputation: 11
I have created an MSI-package to install a WCF service and web application to Windows Server Core 2008 R2 SP1.
The installer-process needs to check if the required features to run the WCF and Web app are installed on this server, and install them only if required.
I believe that we'll need a custom action to achieve this. Please, could does anyone know how to check and install features programmatically?
Looking forward to hearing from you guys.
Many Thanks, Chris
Upvotes: 0
Views: 657
Reputation: 11
I found this to check all feature already install in server core.
To install the server features, i used the Process class to call dism command.
Process.Start("dism.exe", "/online /enable-feature /featurename:IIS-ISAPIFilter");
With this, i could create custom action in MSI that could check and install server feature.
Upvotes: 1
Reputation: 21426
You can use MsiGetFeatureState and MsiSetFeatureState functions.
Please note that these functions use a MSI handle, so you cannot use an EXE or Installer Class Action. You can find a custom action tutorial here: http://www.codeproject.com/KB/install/msicustomaction.aspx
Upvotes: 0