Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 959945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:06:16+00:00 2026-05-16T01:06:16+00:00

Is any way that I can install IIS from C# code? I need to

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:06:16+00:00Added an answer on May 16, 2026 at 1:06 am

    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):

    Sysocmgr.exe /i:sysoc.inf /u:IIS_on.txt
    

    Content of IIS_on.txt

    [Components]
    iis_common = ON
    iis_www = ON
    iis_www_vdir_scripts = ON
    iis_inetmgr = ON
    fp_extensions = ON
    iis_ftp = ON 
    

    For IIS 7 (Windows Vista) and 7.5 (Windows 7):

    start /w pkgmgr /l:log.etw /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-Security;IIS-BasicAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-LegacySnapIn;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI
    

    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/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way that I can programmatically create (and I guess access) hidden
Is there any way that I can change how a Literal of a code
Is there any way that I can find the container pointed to by an
I'm looking for any way that I can improve the selector performance of a
Is there any way so that i can echo password when asked for in
Is there any way that I could get the source of a website (as
Is there any way to have something that looks just like a file on
Is there any way to list all the files that have changed between two
is there any way of making sure that, one user is logged in only
Is there any way to make sure that a table and cells it contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.