作者 GitiJun 2016.11.04 13:37:29 写了58篇文章,回复33人, IIS 在Windows下自动安装(脚本) 阅读:1988· 评论:0· 喜欢:0 IIS 在Windows下自动安装(脚本) -------- ## 版本信息 win7 -> iis7.5 win2000 -> iis5.0, winXP -> iis5.1, win2003 -> iis6.0 ## 安装脚本 ### 样例1# 安装 IIS 7x (已经验证) ``` @echo off echo 正在添加IIS功能,这可能需要几分钟时间... start /w pkgmgr /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-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-IISCertificateMappingAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;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 echo IIS已添加成功! pause ``` ### 样例2# 在win7上安装iis的dos脚本(未验证) ``` dism /online /enable-feature /featurename:IIS-WebServerRole dism /online /enable-feature /featurename:IIS-WebServer dism /online /enable-feature /featurename:IIS-ISAPIExtensions dism /online /enable-feature /featurename:IIS-ASP dism /online /enable-feature /featurename:IIS-ServerSideIncludes dism /online /enable-feature /featurename:IIS-HttpRedirect dism /online /enable-feature /featurename:IIS-WebDAV dism /online /enable-feature /featurename:IIS-IIS6ManagementCompatibility dism /online /enable-feature /featurename:IIS-Metabase ``` ## 常见问题 如果先安装了NET4再安装IIS组件,则需要重新注册.NET到IIS即可。 "%WINDIR%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe" -i 赞 | 0 赏 标签:none