Add Windows Feature from C#

2019-07-18 20:59发布

问题:

As part of an installation package I'm working on, I need to add the IIS feature on Win7 and Win Server 2008. Is there any way of adding new windows features from code?

回答1:

You can do this by calling pkgmgr (a command line utility for installing features and packages).

There is an example of how to do this for MSMQ here:

  • Install Msmq using C#


标签: c# .net iis iis-7