概述
这几天在查如何通过脚本自动安装IIS到windows上,把我得到的结果贴出来共享一下。
IIS6:适用于win server 2003
原文来自http://www.piaodown.com/soft/58190.htm
:: *******************
:: * 安装
:: *******************
:Install
Cls
@echo. && @echo 安装正在进行中...
:: 生成 IIS 6.0 安装脚本,启用 ASP,ASP.NET
@echo [Components]> %TEMP%IIS_Install.txt
@echo iis_common = ON>> %TEMP%IIS_Install.txt
@echo iis_www = ON>> %TEMP%IIS_Install.txt
@echo iis_asp = ON>> %TEMP%IIS_Install.txt
@echo iis_inetmgr = ON>> %TEMP%IIS_Install.txt
@echo aspnet = ON>> %TEMP%IIS_Install.txt
:: 安装 IIS 6.0
%windir%System32Sysocmgr.exe /i:sysoc.inf /u:%TEMP%IIS_Install.txt
del /q /f %windir%*.log >nul 2>nul
del /q /f %TEMP%IIS_Install.txt >nul 2>nul
del /q /f %TEMP%ASPNETSetup.log >nul 2>nul
:: 配置 IIS 启用父路径
@cscript /nologo C:InetpubAdminScriptsadsutil.vbs set W3SVC/AspEnableParentPaths 1 >nul 2>nul
Goto Install_End
IIS7:适用于win 7,win server 2008
原文来自http://www.oschina.net/code/snippet_222150_15228
@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
IIS8:适用于win 8,win server 2012
是在IIS7的安装脚本的基础上修改了几个参数,参考了http://stackoverflow.com/questions/13235727/installing-iis8-with-command-line-parameters
@echo off echo 正在添加IIS8功能,这可能需要几分钟时间...
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;NetFx4Extended-ASPNET45;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 IIS8安装成功!
pause
安装的过程可能需要几分钟,耐心等待它即可。
最后
以上就是快乐冥王星为你收集整理的IIS6,IIS7,IIS8的脚本自动安装的全部内容,希望文章能够帮你解决IIS6,IIS7,IIS8的脚本自动安装所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复