I know that serverManagerCmd.exe -query <foo.xml>
will output list of all roles + features in xml format. However, I do not have the ability to parse this easily as I am writing WiX code.
So is there a command which returns different codes depending on whether the server role you specify are installed or not?
Background: I am trying to write a WiX installer which checks if a server role is installed and only runs a command to install if not already installed.
I believe the Win32_ServerFeature Windows Management Instrumentation (WMI) class may be of use to you. See also, http://msdn.microsoft.com/en-us/library/cc280268(VS.85).aspx.
I've never used WiX, but I'm assuming it supports WMI.