之前收到一個任務,制作安裝包,要求把必備的一些必備的組件如.NET Framework這些玩意用一鍵安裝的形式安裝上去,SQL Server是必備的其中之一。可是在系統必備處勾選了SQL Server 2005 Express SP2(x86),在生成的時候報錯了:
系統必備組件的安裝位置未設置為“組件供應商的網站”,並且無法在磁盤上找到項“SQL Server 2005 Express Edition SP2 (x86)”中的文件“SqlExpress\sqlexpr32.exe”。有關詳細信息,請參見幫助。
可是我谷歌了也谷不出辦法。安裝了SQL Server 2005 Express也是無補於事,還有另一件頭痛的事,安裝SQL Server 2005還需要.NET Framework2.0,這樣系統必備組件我的VS2010里面壓根就沒有啊!這個在網上找了一下還是有解決辦法。就是到VS2005或VS 2008的C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages里面把 DotNetFX文件夾復制到C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages下面。果然在系統必備里多了一項。
對這個做法思考一番,看了一下各個文件夾下面的文件,又嘗試了一下,終於悟出了一些東西,沿用類似的方法,就可以自定義添加系統必備了。
首先要了解一下每個必備項的安裝目錄結構,拿這個SQL Server2008的作為例子
- en和zh-Hans是各種語言版本的安裝包
- product.xml是比較關鍵的一個文檔,定義着這個必備組件的配置信息。
- SqlExpress.exe是檢測程序而已,作用在於安裝時檢測這個必備組件安裝了沒。
接着隨便進入一種語言的目錄下看看,選擇了中文漢語的。
- eula.rtf:安裝時的一些自述信息,例如受什么法律保護之類的。
- package.xml:一鍵安裝時的一些配置信息。
- SQLExpr_x64_chs.exe和SQLExpr_x86_chs.exe是SQL Server 2008 Express的安裝包
上面提及到兩個配置文件,要添加好一個“系統必備”無非就是配置好這些必備組件的安裝信息罷了。
由於還沒完全弄明白各個節點各個屬性的含義,只是把弄明白的列出來
product.xml

1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- SQL Express 2008 VS Bootstrapper : product.xml : Language neutral information --> 3 <Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Microsoft.Sql.Server.Express.10.0"> 4 <RelatedProducts> 5 <EitherProducts> 6 <DependsOnProduct Code=".NETFramework,Version=v4.0" /> 7 <DependsOnProduct Code="Microsoft.Net.Framework.3.5.SP1" /> 8 </EitherProducts> 9 <DependsOnProduct Code="Microsoft.Windows.Installer.4.5" /> 10 <IncludesProduct Code="Microsoft.Sql.Server.Express.1.0" /> 11 <IncludesProduct Code="Microsoft.Sql.Server.Express.9.2" /> 12 </RelatedProducts> 13 <PackageFiles> 14 <PackageFile Name="SqlExpressChk.exe" /> 15 </PackageFiles> 16 </Product>
- Product節點的ProductCode屬性程序的名稱及版本號,注意這個值不能跟其他必備項的ProductCode有重復,不然在對話框里不會顯示。
- DependsOnProduct節點的Code屬性,安裝這個組件前必須先安裝的組件。
- PackageFile節點的Name屬性:檢查是否安裝此程序的檢查程序的名稱。
package.xml

1 <?xml version="1.0" encoding="utf-8" ?> 2 <Package 3 xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" 4 Name="DisplayName" 5 Culture="Culture" 6 LicenseAgreement="eula.rtf"> 7 8 <PackageFiles CopyAllPackageFiles="false"> 9 <PackageFile Name="SQLEXPR32_x86_CHS.EXE" HomeSite="SqlExpr32Exe" PublicKey="3082010a0282010100bd72b489e71c9f85c774b8605c03363d9cfd997a9a294622b0a78753edee463ac75b050b57a8b7ca05ccd34c77477085b3e5cbdf67e7a3fd742793679fd78a034430c6f7c9bac93a1d0856444f17080df9b41968aa241cfb055785e9c54e072137a7ebce2c2fb642cd2105a7d6e6d32857c71b7ace293607cd9e55ccbbf122eba823a40d29c2fbd0c35a3e633dc72c490b7b7985f088ef71bd435ae3a3b30df355fb25e0e220d3e79a5e94a5332d287f571b556a0c3244ef666c6ff0389cef02ad9aa1dd9807100e3c1869e2794e4614e0b98cd0756d9cac009c2d42f551b85af4784583e92e7c2bbb5dcd196128ad94430ac56a42ffb532aea42922de16e8d30203010001"/> 10 <PackageFile Name="SQLEXPR_x64_CHS.EXE" HomeSite="SqlExpr64Exe" PublicKey="3082010a0282010100bd72b489e71c9f85c774b8605c03363d9cfd997a9a294622b0a78753edee463ac75b050b57a8b7ca05ccd34c77477085b3e5cbdf67e7a3fd742793679fd78a034430c6f7c9bac93a1d0856444f17080df9b41968aa241cfb055785e9c54e072137a7ebce2c2fb642cd2105a7d6e6d32857c71b7ace293607cd9e55ccbbf122eba823a40d29c2fbd0c35a3e633dc72c490b7b7985f088ef71bd435ae3a3b30df355fb25e0e220d3e79a5e94a5332d287f571b556a0c3244ef666c6ff0389cef02ad9aa1dd9807100e3c1869e2794e4614e0b98cd0756d9cac009c2d42f551b85af4784583e92e7c2bbb5dcd196128ad94430ac56a42ffb532aea42922de16e8d30203010001"/> 11 <PackageFile Name="eula.rtf"/> 12 </PackageFiles> 13 14 <InstallChecks> 15 <ExternalCheck Property="SQLExpressChk" PackageFile="SqlExpressChk.exe" Arguments="10.0.1600 2052"/> 16 </InstallChecks> 17 18 <Commands Reboot="Defer"> 19 20 <!-- Defines a new installation (x86) --> 21 <Command PackageFile="SQLEXPR32_x86_CHS.EXE" 22 Arguments='/q /hideconsole /action=Install /features=SQL /instancename=SQLEXPRESS /enableranu=1 /sqlsvcaccount="NT Authority\Network Service" /AddCurrentUserAsSqlAdmin /skiprules=RebootRequiredCheck' 23 EstimatedInstalledBytes="225000000" 24 EstimatedInstallSeconds="420"> 25 <InstallConditions> 26 <FailIf Property="VersionNT" Compare="ValueNotExists" String="GeneralFailure"/> 27 <FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.1.2" String="InvalidPlatformXP"/> 28 <FailIf Property="VersionNT" Compare="VersionEqualTo" Value="5.2.0" String="InvalidPlatform2K3"/> 29 <FailIf Property="VersionNT" Compare="VersionEqualTo" Value="5.2.1" String="InvalidPlatform2K3"/> 30 <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/> 31 <FailIf Property="SQLExpressChk" Compare="ValueEqualTo" Value="-1" String="InvalidUpgradeNotExpress"/> 32 <FailIf Property="SQLExpressChk" Compare="ValueEqualTo" Value="-2" String="InvalidUpgradeNotExpressCore"/> 33 <FailIf Property="SQLExpressChk" Compare="ValueEqualTo" Value="-3" String="InvalidUpgradeLanguage"/> 34 <FailIf Property="SQLExpressChk" Compare="ValueEqualTo" Value="-4" String="InvalidUpgradeWoW"/> 35 <FailIf Property="SQLExpressChk" Compare="ValueLessThan" Value="-4" String="GeneralFailure"/> 36 <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel"/> 37 <BypassIf Property="SQLExpressChk" Compare="ValueNotEqualTo" Value="1"/> 38 </InstallConditions> 39 <ExitCodes> 40 <ExitCode Value="0" Result="Success"/> 41 <ExitCode Value="1641" Result="SuccessReboot"/> 42 <ExitCode Value="3010" Result="SuccessReboot"/> 43 <!-- 0x84BE0BC2 (1214,3010) --> 44 <ExitCode Value="-2067919934" Result="FailReboot"/> 45 <!-- 0x84C10BC2 (1217,3010) --> 46 <ExitCode Value="-2067723326" Result="FailReboot"/> 47 <!-- 0x84BE0007 (1214,7) --> 48 <ExitCode Value="-2067922937" Result="Fail" String="AdminRequired"/> 49 <!-- 0x84C4001F (1220,31) --> 50 <ExitCode Value="-2067529697" Result="Fail" String="AdminRequired"/> 51 <!-- 0x84BE0001 (1214,1)--> 52 <ExitCode Value="-2067922943" Result="Fail" String="InvalidPlatformOSServicePacks"/> 53 <!-- 0x84C4000B (1220,11) --> 54 <ExitCode Value="-2067529717" Result="Fail" String="AnotherInstanceRunning"/> 55 <!-- 0x84BE01F8 (1214,504) --> 56 <ExitCode Value="-2067922440" Result="Fail" String="BetaComponentsFailure"/> 57 <!-- 0x84BE01FA (1214,506) --> 58 <ExitCode Value="-2067922438" Result="Fail" String="BetaComponentsFailure"/> 59 <!-- 0x84BE0202 (1214,514) --> 60 <ExitCode Value="-2067922430" Result="Fail" String="InvalidPlatformArchitecture"/> 61 <!-- 0x84BE0203 (1214,515) --> 62 <ExitCode Value="-2067922429" Result="Fail" String="InvalidPlatformArchitecture"/> 63 <ExitCode Value="216" Result="Fail" String="InvalidPlatformArchitecture"/> 64 <DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" /> 65 </ExitCodes> 66 </Command> 67 68 <!-- Defines an upgrade installation (x86) --> 69 <Command PackageFile="SQLEXPR32_x86_CHS.EXE" 70 Arguments="/q /hideconsole /action=Upgrade /instancename=SQLEXPRESS /skiprules=RebootRequiredCheck" 71 EstimatedInstalledBytes="225000000" 72 EstimatedInstallSeconds="420"> 73 <InstallConditions> 74 <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel"/> 75 <BypassIf Property="SQLExpressChk" Compare="ValueNotEqualTo" Value="2"/> 76 </InstallConditions> 77 <ExitCodes> 78 <ExitCode Value="0" Result="Success"/> 79 <ExitCode Value="1641" Result="SuccessReboot"/> 80 <ExitCode Value="3010" Result="SuccessReboot"/> 81 <!-- 0x84BE0BC2 (1214,3010) --> 82 <ExitCode Value="-2067919934" Result="FailReboot"/> 83 <!-- 0x84C10BC2 (1217,3010) --> 84 <ExitCode Value="-2067723326" Result="FailReboot"/> 85 <!-- 0x84BE0007 (1214,7) --> 86 <ExitCode Value="-2067922937" Result="Fail" String="AdminRequired"/> 87 <!-- 0x84C4001F (1220,31) --> 88 <ExitCode Value="-2067529697" Result="Fail" String="AdminRequired"/> 89 <!-- 0x84BE0001 (1214,1)--> 90 <ExitCode Value="-2067922943" Result="Fail" String="InvalidPlatformOSServicePacks"/> 91 <!-- 0x84C4000B (1220,11) --> 92 <ExitCode Value="-2067529717" Result="Fail" String="AnotherInstanceRunning"/> 93 <!-- 0x84BE01F8 (1214,504) --> 94 <ExitCode Value="-2067922440" Result="Fail" String="BetaComponentsFailure"/> 95 <!-- 0x84BE01FA (1214,506) --> 96 <ExitCode Value="-2067922438" Result="Fail" String="BetaComponentsFailure"/> 97 <!-- 0x84BE0202 (1214,514) --> 98 <ExitCode Value="-2067922430" Result="Fail" String="InvalidPlatformArchitecture"/> 99 <!-- 0x84BE0203 (1214,515) --> 100 <ExitCode Value="-2067922429" Result="Fail" String="InvalidPlatformArchitecture"/> 101 <ExitCode Value="216" Result="Fail" String="InvalidPlatformArchitecture"/> 102 <DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" /> 103 </ExitCodes> 104 </Command> 105 106 <!-- Defines a new installation (amd64) --> 107 <Command PackageFile="SQLEXPR_x64_CHS.EXE" 108 Arguments='/q /hideconsole /action=Install /features=SQL /instancename=SQLEXPRESS /enableranu=1 /sqlsvcaccount="NT Authority\Network Service" /AddCurrentUserAsSqlAdmin /skiprules=RebootRequiredCheck' 109 EstimatedInstalledBytes="225000000" 110 EstimatedInstallSeconds="420"> 111 <InstallConditions> 112 <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="amd64"/> 113 <BypassIf Property="SQLExpressChk" Compare="ValueNotEqualTo" Value="1"/> 114 </InstallConditions> 115 <ExitCodes> 116 <ExitCode Value="0" Result="Success"/> 117 <ExitCode Value="1641" Result="SuccessReboot"/> 118 <ExitCode Value="3010" Result="SuccessReboot"/> 119 <!-- 0x84BE0BC2 (1214,3010) --> 120 <ExitCode Value="-2067919934" Result="FailReboot"/> 121 <!-- 0x84C10BC2 (1217,3010) --> 122 <ExitCode Value="-2067723326" Result="FailReboot"/> 123 <!-- 0x84BE0007 (1214,7) --> 124 <ExitCode Value="-2067922937" Result="Fail" String="AdminRequired"/> 125 <!-- 0x84C4001F (1220,31) --> 126 <ExitCode Value="-2067529697" Result="Fail" String="AdminRequired"/> 127 <!-- 0x84BE0001 (1214,1)--> 128 <ExitCode Value="-2067922943" Result="Fail" String="InvalidPlatformOSServicePacks"/> 129 <!-- 0x84C4000B (1220,11) --> 130 <ExitCode Value="-2067529717" Result="Fail" String="AnotherInstanceRunning"/> 131 <!-- 0x84BE01F8 (1214,504) --> 132 <ExitCode Value="-2067922440" Result="Fail" String="BetaComponentsFailure"/> 133 <!-- 0x84BE01FA (1214,506) --> 134 <ExitCode Value="-2067922438" Result="Fail" String="BetaComponentsFailure"/> 135 <!-- 0x84BE0202 (1214,514) --> 136 <ExitCode Value="-2067922430" Result="Fail" String="InvalidPlatformArchitecture"/> 137 <!-- 0x84BE0203 (1214,515) --> 138 <ExitCode Value="-2067922429" Result="Fail" String="InvalidPlatformArchitecture"/> 139 <ExitCode Value="216" Result="Fail" String="InvalidPlatformArchitecture"/> 140 <DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" /> 141 </ExitCodes> 142 </Command> 143 144 <!-- Defines an upgrade installation (amd64) --> 145 <Command PackageFile="SQLEXPR_x64_CHS.EXE" 146 Arguments="/q /hideconsole /action=Upgrade /instancename=SQLEXPRESS /skiprules=RebootRequiredCheck" 147 EstimatedInstalledBytes="225000000" 148 EstimatedInstallSeconds="420"> 149 <InstallConditions> 150 <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="amd64"/> 151 <BypassIf Property="SQLExpressChk" Compare="ValueNotEqualTo" Value="2"/> 152 </InstallConditions> 153 <ExitCodes> 154 <ExitCode Value="0" Result="Success"/> 155 <ExitCode Value="1641" Result="SuccessReboot"/> 156 <ExitCode Value="3010" Result="SuccessReboot"/> 157 <!-- 0x84BE0BC2 (1214,3010) --> 158 <ExitCode Value="-2067919934" Result="FailReboot"/> 159 <!-- 0x84C10BC2 (1217,3010) --> 160 <ExitCode Value="-2067723326" Result="FailReboot"/> 161 <!-- 0x84BE0007 (1214,7) --> 162 <ExitCode Value="-2067922937" Result="Fail" String="AdminRequired"/> 163 <!-- 0x84C4001F (1220,31) --> 164 <ExitCode Value="-2067529697" Result="Fail" String="AdminRequired"/> 165 <!-- 0x84BE0001 (1214,1)--> 166 <ExitCode Value="-2067922943" Result="Fail" String="InvalidPlatformOSServicePacks"/> 167 <!-- 0x84C4000B (1220,11) --> 168 <ExitCode Value="-2067529717" Result="Fail" String="AnotherInstanceRunning"/> 169 <!-- 0x84BE01F8 (1214,504) --> 170 <ExitCode Value="-2067922440" Result="Fail" String="BetaComponentsFailure"/> 171 <!-- 0x84BE01FA (1214,506) --> 172 <ExitCode Value="-2067922438" Result="Fail" String="BetaComponentsFailure"/> 173 <!-- 0x84BE0202 (1214,514) --> 174 <ExitCode Value="-2067922430" Result="Fail" String="InvalidPlatformArchitecture"/> 175 <!-- 0x84BE0203 (1214,515) --> 176 <ExitCode Value="-2067922429" Result="Fail" String="InvalidPlatformArchitecture"/> 177 <ExitCode Value="216" Result="Fail" String="InvalidPlatformArchitecture"/> 178 <DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" /> 179 </ExitCodes> 180 </Command> 181 182 </Commands> 183 184 <Strings> 185 <String Name="DisplayName">SQL Server 2008 Express Edition</String> 186 <String Name="Culture">zh-CHS</String> 187 <String Name="SqlExpr32Exe">http://go.microsoft.com/fwlink/?LinkID=153228&clcid=0x804</String> 188 <String Name="SqlExpr64Exe">http://go.microsoft.com/fwlink/?LinkID=153229&clcid=0x804</String> 189 <String Name="AdminRequired">您沒有安裝 SQL Server 2008 Express Edition 所需的權限。請與您的管理員聯系。</String> 190 <String Name="GeneralFailure">試圖安裝 SQL Server 2008 Express Edition 時發生錯誤。</String> 191 <String Name="InvalidPlatformXP">要安裝 SQL Server 2008 Express Edition,需要 Windows XP Service Pack 2 或更高版本。</String> 192 <String Name="InvalidPlatform2K3">要安裝 SQL Server 2008 Express Edition,需要 Windows 2003 Service Pack 2 或更高版本。</String> 193 <String Name="MissingMSXml">SQL Server 2008 Express Edition 需要 MSXML。請確保已正確安裝 MSXML。</String> 194 <String Name="InsufficientHardware">當前系統不滿足 SQL Server 2008 Express Edition 的最低硬件要求。請與您的應用程序供應商聯系。</String> 195 <String Name="InvalidPlatformOSServicePacks">當前操作系統不滿足 SQL Server 2008 Express Edition 的 Service Pack 級別要求。在繼續安裝之前,請從位於 http://www.microsoft.com/downloads/search.aspx?displaylang=zh-cn 的 Microsoft 下載中心安裝最新的 Service Pack。</String> 196 <String Name="InvalidPlatformIE">此版本的 SQL Server 2008 Express Edition 需要 Internet Explorer 6.0 版(帶SP1)或更高版本。若要繼續,請安裝或升級到 Internet Explorer 的所需版本,然后再次運行安裝程序。</String> 197 <String Name="AnotherInstanceRunning">安裝程序的另一個實例已經運行。必須完成正在運行的實例,此安裝程序才能繼續。</String> 198 <String Name="BetaComponentsFailure">在該計算機上檢測到 .NET Framework 2.0 或 SQL Server 的測試版。在繼續之前,請卸載 SQL Server 2008 組件、SQL Server 支持文件或 .NET Framework 2.0 的任何早期測試版本。</String> 199 <String Name="InvalidPlatformArchitecture">當前處理器結構不支持此版本的 SQL Server 2008 Express Edition。</String> 200 <String Name="InvalidUpgradeNotExpress">名為“SQLEXPRESS”的 SQL Server 2005 實例不是 SQL Server Express 實例,無法將它升級到 SQL Server 2008 Express Service Pack 1。</String> 201 <String Name="InvalidUpgradeNotExpressCore">名為“SQLEXPRESS”的 SQL Server 2005 Express 實例包含 SQL Server Express 2008 Service Pack 1 中未包括的組件。SQL Server Express 2008 SP1 無法升級此實例。請改用具有高級服務的 SQL Server 2008 Express 版本。</String> 202 <String Name="InvalidUpgradeLanguage">名為“SQLEXPRESS”的 SQL Server 2005 Express 實例的語言與此 SQL Server 2008 Express Service Pack 1 的語言不同。SQL Server 2008 Express Service Pack 1 無法升級此實例。</String> 203 <String Name="InvalidUpgradeWoW">SQL Server 2008 Express Service Pack 1 (x64) 無法升級現有的名為“SQLEXPRESS”的 SQL Server 2005 Express (x64 WoW) 實例。請卸載此 SQL Server 2005 Express 實例,然后重新嘗試安裝 SQL Server 2008 Express Service Pack 1 (x64)。</String> 204 </Strings> 205 </Package>
- Package節點的LicenseAgreement屬性:授權聲明的文件名
- PackageFile節點的Name屬性和Command節點的PackageFile屬性都是安裝包的文件名。
- String節點且屬性Name是DisplayName的內容則是顯示在“系統必備”對話框的組件項的名稱。
- Command節點的Arguments屬性是安裝程序的命令行參數,通過這些參數的設置可以跳開用戶在安裝程序界面上點擊輸入等步驟。
下面就舉兩個例子,來說明整個流程
解決“找不到SqlExpress\sqlexpr32.exe”那個錯誤的
可以到微軟官網下載SQL Server 2005 Express的任何一個SP版,我這里就下了SP3版的,聽說64位的版本在32位的系統上安裝也行,於是我這里單純弄個64位的安裝包進去就算了。
- 在C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages目錄下新建一個文件夾SqlExpress2005 SP3,把SqlExpress文件夾里的內容全拷過去。
- 打開product.xml文件,把Product節點的ProductCode屬性改成這樣Microsoft.Sql.Server.Express.9.3(因為是sp3版)。
- 把zh-Hans目錄下的eula.txt文件中的“SERVICE PACK 2”改成“SERVICE PACK 3”;
- 把SQL Server 2005 Express SP3的安裝包拷到這里,重命名為sqlexprSP3.exe (個人喜好);
- 把package.xml里面的“sqlexpr32.exe”全部重命名為“sqlexprSP3.exe”(這個名字要與安裝包的名字保持一致),把String節點 Name屬性的值為"DisplayName"的內容改成SQL Server 2005 Express Edition SP3 (x64);Command節點的Arguments屬性不用改了,因為命令參數都是一樣的。
這樣打開系統必備的時候只要勾選了SQL Server 2005 Express Edition SP3 (x64)就不會報錯了。
但是要是勾SP2還是會報錯的,除非你把一個32位的SP2安裝包命名為sqlexpr32.exe塞到C:\Program Files \Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\SqlExpress\zh-Hans目錄下就沒事.
自定義一個系統必備項
我這里就添加一個Dr.COM-客戶端安裝程序,首先在C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages下新建一個文件夾“TestDrCom”
新建一個product.xml文件,敲入以下內容
1 <?xml version="1.0" encoding="utf-8"?> 2 <Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Dr.COM.3.7"> 3 </Product>
新建一個文件夾“zh-Hans”,在里面放置Dr.COM-客戶端的安裝程序Dr.COM-Client v3.72.exe。
新建一個無厘頭的自述文件“fatezero.txt”,文件內容是在百度百科里fate zero的介紹。
接着到添加package.xml文件(由於對這個文件了解不透徹,我是從數據庫那邊復制過來的)把Package節點的屬性LicenseAgreement改成fatezero.txt;把PackageFile 節點的屬性Name 改成Dr.COM-Client v3.72.exe;把所有Command節點的屬性PackageFile改成Dr.COM-Client v3.72.exe;把所有Command節點的屬性Arguments設成空(就是這樣子Arguments="",因為不知道這個安裝程序的安裝命令);把String節點並且屬性Name的值是DisplayName的內容改成Dr.COM-客戶端安裝程序Ver3.72。保存就行了。
在系統必備項的對話框會多了一項
運行生成后的安裝程序setup.exe
可惜編碼沒弄好,顯示的只是亂碼
由於沒有安裝程序的命令,這里沒達到一鍵安裝的效果,仍然要手動去填寫選擇安裝的配置信息
整篇文章到此結束,由於有部分內容了解得不夠多,還請各位多多指點,謝謝!