Is any way that I can install IIS from C# code?
I need to create a deploy installer for my application but I need that IIS to be installed in the machine so I want to verify if IIS is installed using C# code and install it if it’s not.
The installer must work with all versions of IIS.
Thanks in advance.
Paulo
Here in the method I used:
I call the followind command line applications for the different IIS versions.
For IIS 5.1 (Windows XP) and IIS 6 (Windows Server 2003):
Content of IIS_on.txt
For IIS 7 (Windows Vista) and 7.5 (Windows 7):
Here are some links about this subject:
Link
http://support.microsoft.com/kb/309506
http://technet.microsoft.com/pt-br/library/cc731911(WS.10).aspx
http://learn.iis.net/page.aspx/132/install-iis-7-from-the-command-line/
http://learn.iis.net/page.aspx/479/iis-70-features-and-vista-editions/
http://learn.iis.net/page.aspx/135/discover-installed-components/