我們在安裝系統(tǒng)的時候不選擇安裝IIS,等系統(tǒng)安裝完成后手動來做,我們可以使用無人值守的方式自定義安裝IIS 5.0。首先確認(rèn)你的 Windows 2000的安裝介質(zhì)是可用的,本例中的安裝介質(zhì)是光盤,因此只要將安裝光盤插入光驅(qū)即可,然后在你的硬盤或者軟盤上創(chuàng)建一個無人值守安裝文件,本例中我們將在D盤創(chuàng)建一個 IIS5install.txt 作為無人值守安裝文件,下面我們看看該文件的內(nèi)容:
[Components] 所安裝的組件
iis_common = on 公用文件
iis_inetmgr = on IIS管理器
iis_www = on WWW服務(wù)
iis_ftp = on FTP服務(wù)
iis_htmla = on Web方式的IIS管理器
[InternetServer]
Path="D:inetsrv" Common文件放置位置(如果你是卸載了IIS再手動裝,公用文件還是會位置保持不變)
PathFTPRoot="D:inetPubFTPRoot" FTP的根路徑
PathWWWRoot="D:InetPubwwwroot" WWW的根路徑
將該文件存盤后,運行“sysocmgr /i:%windir%infsysoc.inf /u:d:iis5install.txt”,
不會有提示框出現(xiàn),系統(tǒng)將自動的為你安裝好IIS,而且Scripts目錄將會在D盤,使用“Unicode解碼目錄遍歷漏洞”也就失效了。
如果你需要安裝更多的IIS組件,以下是一個比較詳細(xì)的無人值守安裝文件:
====================BEGIN======================
;This is an example Unattended installation file
;IIS, MTS, and Index Server are ON
;Target Path should be new directory
;Adminpassword is blank.
[Unattended]
Unattendmode = FullUnattended
OemPreinstall = NO
TargetPath = *
Filesystem = LeaveAlone
[UserData]
FullName = "Your User Name"
OrgName = "Your Organization Name"
ComputerName = "ComputerName"
[GuiUnattended]
TimeZone = "004"
AdminPassword = *
AutoLogon = Yes
[LicenseFilePrintData]
AutoMode = "PerServer"
AutoUsers = "0"
[Display]
BitsPerPel = 4
XResolution = 800
YResolution = 600
VRefresh = 70
[Networking]
InstallDefaultComponents = YES
[Identification]
JoinWorkgroup = Workgroup
;Turns NT Components (and their respective sections) ON or OFF
[Components]
iis_common = on
iis_inetmgr = on
iis_www = on
iis_ftp = on
iis_htmla = on
iis_doc = on
iis_pwmgr = on
iis_smtp = on
iis_smtp_docs = on
mts_core = on
msmq = off
terminalservices = off
reminst = off
certsrv = off
rstorage = off
indexsrv_system = on
certsrv_client = off
certsrv_server = off
certsrv_doc = off
[InternetServer]
;Without these keys specified IIS will use the default settings
; Note that the Path is location for INETSRV, the core IIS programs and files.
Path=D:Securelocation
PathFTPRoot=E:InetpubFtproot PathWWWRoot=E:InetpubWwwroot