0

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

wadezig
  • 11
  • 3

2 Answers2

1

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.

Community
  • 1
  • 1
wadezig
  • 11
  • 3
0

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

Cosmin
  • 21,216
  • 5
  • 45
  • 60