Our application supported for OS 'Windows server 2012 R2'. We have an application in which we need to have 'Application Initialization' feature to be enabled. We have used Installshield 2014 for making the installer of our application. I have found the implementation of checking the status of any windows feature. I have tried the following code which had given me the list of installed features:
ManagementClass objMC = new ManagementClass("Win32_ServerFeature");
ManagementObjectCollection objMOC = objMC.GetInstances();
string featureName = string.Empty;
var AppInitFeature = (from ManagementObject objectFeature in objMOC
where objectFeature.Properties["Name"].Value.ToString() == "Application Initialization"
select objectFeature).First();
Here my question is: Is there any built-in capability in installshield to enable the windows feature? OR we need to write any custom action for that. If we need to write a custom action, then how to enable the windows feature through c# code.
Can anyone help me on this.
Thanks in anticipation.