Bootstrap Manifest Generator(BMG) 生成的product.xml 试分析
2015-12-25 09:54
621 查看
BMG是一个应用于ClickOnce发布中自制系统必备包的图形化工具。ClickOnce的系统必备包放在C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\(VS2008)。通过BMG我们可以自行定义包括第三方组件在内的安装方案。以下是通过比对VS2008自带Packages,对product.xml的试分析。
定制的product.xml内容如下:
<?xml version="1.0" encoding="utf-8" ?>
<Productxmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"ProductCode="Microsoft.Net.Framework.2.0(显示在ClickOnce系统必备中的名称)">
<RelatedProducts>(关联安装包)
<IncludesProductCode(包含方式,另外还有一种Depend依赖方式)="Microsoft.Windows.Installer.2.0"/>
</RelatedProducts>
-<!--Defines list of files to be copied on build -->
<PackageFilesCopyAllPackageFiles="false">(为True的话是每次安装都下载全部系统必备安装包)
<PackageFileName="instmsia.exe"HomeSite="InstMsiAExe"PublicKey="略"/>
<PackageFileName="WindowsInstaller-KB893803-v2-x86.exe"HomeSite="略"/>
<PackageFileName="dotnetfx.exe"HomeSite="DotNetFXExe"PublicKey="略"/>
<PackageFileName="dotnetchk.exe"/> (这个小工具是检查客户机是否安装dotnetframwork)
必备安装包内共四个文件
</PackageFiles>
<InstallChecks>(安装前进行检查)
<ExternalCheck Property="DotNetInstalled"PackageFile="dotnetchk.exe"/>(外部程序检查,若本机安装dotnet,则退出代码为"DotNetInstalled")
<RegistryCheck Property="IEVersion"Key="HKLM\Software\Microsoft\Internet Explorer"Value="Version"/>(注册表检查)
另外还有 AssemblyCheck(检查GAC中是否有指定的程序集)、FileCheck(检查指定文件是否存在)、MsiProductCheck(检查指定的 Microsoft Windows Installer 安装是否已运行完毕)
</InstallChecks>
以上为全局检查,也可以每个包内组件各自检查。
-<!--Defines how to invoke the setup for the .NET Framework redist -->
<CommandsReboot="Immediate">(若指定Reboot,则立即重启)
<CommandPackageFile="instmsia.exe"Arguments="/q /c:"msiinst /delayrebootq"(可带参数运行安装组件)"EstimatedInstallSeconds="20">
<InstallConditions>(安装条件)
<BypassIfProperty="VersionNT"Compare="ValueExists"/> (这句的意思是检查NT版本,若存在则通过)
<BypassIfProperty="VersionMsi"Compare="VersionGreaterThanOrEqualTo"Value="2.0"/>(若MSI安装器的版本大于等于2.0则通过)
</InstallConditions>
<ExitCodes>
<ExitCodeValue="0"Result="SuccessReboot"/> (退出代码为0,则返回提示成功并重启)
<ExitCodeValue="1641"Result="SuccessReboot"/>
<ExitCodeValue="3010"Result="SuccessReboot"/>
<DefaultExitCodeResult="Fail"FormatMessageFromSystem="true"String="GeneralFailure"/>
</ExitCodes>
</Command>
以上为一个安装组件的配置——每个Command标签一个安装组件,下同。
<CommandPackage
c6ed
File="WindowsInstaller-KB893803-v2-x86.exe"Arguments="/quiet /norestart"EstimatedInstallSeconds="21">
<InstallConditions>
<BypassIfProperty="Version9x"Compare="ValueExists"/>
<BypassIfProperty="VersionNT"Compare="VersionLessThan"Value="5.0.3"/>
<BypassIfProperty="VersionMsi"Compare="VersionGreaterThanOrEqualTo"Value="3.0"/>
<FailIfProperty="AdminUser"Compare="ValueEqualTo"Value="false"String="AdminRequired"/>
</InstallConditions>
<ExitCodes>
<ExitCodeValue="0"Result="Success"/>
<ExitCodeValue="1641"Result="SuccessReboot"/>
<ExitCodeValue="3010"Result="SuccessReboot"/>
<DefaultExitCodeResult="Fail"FormatMessageFromSystem="true"String="GeneralFailure"/>
</ExitCodes>
</Command>
<CommandPackageFile="dotnetfx.exe"Arguments="/q:a /c:"install /q /l""EstimatedInstalledBytes="180000000"EstimatedTempBytes="110000000"EstimatedInstallSeconds="420">
-<!--These checks determine whether the package is to be installed -->
<InstallConditions>
-<!--Either of these properties indicates the .Net Framework is already installed -->
<BypassIfProperty="DotNetInstalled"Compare="ValueNotEqualTo"Value="0"/>
-<!--Block install if user does not have admin privileges -->
<FailIfProperty="AdminUser"Compare="ValueEqualTo"Value="false"String="AdminRequired"/>
-<!--Block install on Windows 95 -->
<FailIfProperty="Version9x"Compare="VersionLessThan"Value="4.10"String="InvalidPlatformWin9x"/>
-<!--Block install on Windows 2000 SP 2 or less -->
<FailIfProperty="VersionNT"Compare="VersionLessThan"Value="5.0.3"String="InvalidPlatformWinNT"/>
-<!--Block install if IE 5.01 or greater is not present -->
<FailIfProperty="IEVersion"Compare="ValueNotExists"String="InvalidPlatformIE"/>
<FailIfProperty="IEVersion"Compare="VersionLessThan"Value="5.0.2900"String="InvalidPlatformIE"/>
-<!--Block install if the platform is not x86 -->
<FailIfProperty="ProcessorArchitecture"Compare="ValueNotEqualTo"Value="Intel"String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCodeValue="0"Result="Success"/>
<ExitCodeValue="3010"Result="SuccessReboot"/>
<ExitCodeValue="4097"Result="Fail"String="AdminRequired"/>
<ExitCodeValue="4099"Result="Fail"String="WindowsInstallerImproperInstall"/>
<ExitCodeValue="4101"Result="Fail"String="AnotherInstanceRunning"/>
<ExitCodeValue="4113"Result="Fail"String="BetaNDPFailure"/>
<DefaultExitCodeResult="Fail"FormatMessageFromSystem="true"String="GeneralFailure"/>
</ExitCodes>
</Command>
</Commands>
</Product>
BMG下载地址
BMG截图
定制的product.xml内容如下:
<?xml version="1.0" encoding="utf-8" ?>
<Productxmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"ProductCode="Microsoft.Net.Framework.2.0(显示在ClickOnce系统必备中的名称)">
<RelatedProducts>(关联安装包)
<IncludesProductCode(包含方式,另外还有一种Depend依赖方式)="Microsoft.Windows.Installer.2.0"/>
</RelatedProducts>
-<!--Defines list of files to be copied on build -->
<PackageFilesCopyAllPackageFiles="false">(为True的话是每次安装都下载全部系统必备安装包)
<PackageFileName="instmsia.exe"HomeSite="InstMsiAExe"PublicKey="略"/>
<PackageFileName="WindowsInstaller-KB893803-v2-x86.exe"HomeSite="略"/>
<PackageFileName="dotnetfx.exe"HomeSite="DotNetFXExe"PublicKey="略"/>
<PackageFileName="dotnetchk.exe"/> (这个小工具是检查客户机是否安装dotnetframwork)
必备安装包内共四个文件
</PackageFiles>
<InstallChecks>(安装前进行检查)
<ExternalCheck Property="DotNetInstalled"PackageFile="dotnetchk.exe"/>(外部程序检查,若本机安装dotnet,则退出代码为"DotNetInstalled")
<RegistryCheck Property="IEVersion"Key="HKLM\Software\Microsoft\Internet Explorer"Value="Version"/>(注册表检查)
另外还有 AssemblyCheck(检查GAC中是否有指定的程序集)、FileCheck(检查指定文件是否存在)、MsiProductCheck(检查指定的 Microsoft Windows Installer 安装是否已运行完毕)
</InstallChecks>
以上为全局检查,也可以每个包内组件各自检查。
-<!--Defines how to invoke the setup for the .NET Framework redist -->
<CommandsReboot="Immediate">(若指定Reboot,则立即重启)
<CommandPackageFile="instmsia.exe"Arguments="/q /c:"msiinst /delayrebootq"(可带参数运行安装组件)"EstimatedInstallSeconds="20">
<InstallConditions>(安装条件)
<BypassIfProperty="VersionNT"Compare="ValueExists"/> (这句的意思是检查NT版本,若存在则通过)
<BypassIfProperty="VersionMsi"Compare="VersionGreaterThanOrEqualTo"Value="2.0"/>(若MSI安装器的版本大于等于2.0则通过)
</InstallConditions>
<ExitCodes>
<ExitCodeValue="0"Result="SuccessReboot"/> (退出代码为0,则返回提示成功并重启)
<ExitCodeValue="1641"Result="SuccessReboot"/>
<ExitCodeValue="3010"Result="SuccessReboot"/>
<DefaultExitCodeResult="Fail"FormatMessageFromSystem="true"String="GeneralFailure"/>
</ExitCodes>
</Command>
以上为一个安装组件的配置——每个Command标签一个安装组件,下同。
<CommandPackage
c6ed
File="WindowsInstaller-KB893803-v2-x86.exe"Arguments="/quiet /norestart"EstimatedInstallSeconds="21">
<InstallConditions>
<BypassIfProperty="Version9x"Compare="ValueExists"/>
<BypassIfProperty="VersionNT"Compare="VersionLessThan"Value="5.0.3"/>
<BypassIfProperty="VersionMsi"Compare="VersionGreaterThanOrEqualTo"Value="3.0"/>
<FailIfProperty="AdminUser"Compare="ValueEqualTo"Value="false"String="AdminRequired"/>
</InstallConditions>
<ExitCodes>
<ExitCodeValue="0"Result="Success"/>
<ExitCodeValue="1641"Result="SuccessReboot"/>
<ExitCodeValue="3010"Result="SuccessReboot"/>
<DefaultExitCodeResult="Fail"FormatMessageFromSystem="true"String="GeneralFailure"/>
</ExitCodes>
</Command>
<CommandPackageFile="dotnetfx.exe"Arguments="/q:a /c:"install /q /l""EstimatedInstalledBytes="180000000"EstimatedTempBytes="110000000"EstimatedInstallSeconds="420">
-<!--These checks determine whether the package is to be installed -->
<InstallConditions>
-<!--Either of these properties indicates the .Net Framework is already installed -->
<BypassIfProperty="DotNetInstalled"Compare="ValueNotEqualTo"Value="0"/>
-<!--Block install if user does not have admin privileges -->
<FailIfProperty="AdminUser"Compare="ValueEqualTo"Value="false"String="AdminRequired"/>
-<!--Block install on Windows 95 -->
<FailIfProperty="Version9x"Compare="VersionLessThan"Value="4.10"String="InvalidPlatformWin9x"/>
-<!--Block install on Windows 2000 SP 2 or less -->
<FailIfProperty="VersionNT"Compare="VersionLessThan"Value="5.0.3"String="InvalidPlatformWinNT"/>
-<!--Block install if IE 5.01 or greater is not present -->
<FailIfProperty="IEVersion"Compare="ValueNotExists"String="InvalidPlatformIE"/>
<FailIfProperty="IEVersion"Compare="VersionLessThan"Value="5.0.2900"String="InvalidPlatformIE"/>
-<!--Block install if the platform is not x86 -->
<FailIfProperty="ProcessorArchitecture"Compare="ValueNotEqualTo"Value="Intel"String="InvalidPlatformArchitecture"/>
</InstallConditions>
<ExitCodes>
<ExitCodeValue="0"Result="Success"/>
<ExitCodeValue="3010"Result="SuccessReboot"/>
<ExitCodeValue="4097"Result="Fail"String="AdminRequired"/>
<ExitCodeValue="4099"Result="Fail"String="WindowsInstallerImproperInstall"/>
<ExitCodeValue="4101"Result="Fail"String="AnotherInstanceRunning"/>
<ExitCodeValue="4113"Result="Fail"String="BetaNDPFailure"/>
<DefaultExitCodeResult="Fail"FormatMessageFromSystem="true"String="GeneralFailure"/>
</ExitCodes>
</Command>
</Commands>
</Product>
BMG下载地址
BMG截图
相关文章推荐
- Bootstrap Manifest Generator(BMG) 生成的product.xml 试分析
- Bootstrap wysiwyg,将富文本数据保存到mysql
- 为bootstrap设计的漂亮图标
- Bootstrap记录点滴
- Bootstrap wysiwyg,将富文本数据保存到mysql
- 沈大海Bootstrap系列教程
- BootStrap学习之下拉列表
- 文章标题
- BootStrap插件使用之模态框
- Bootstrap之表格
- bootstrap实现弹出窗口
- Bootstrap - navigation
- bootstrap table 绑定数据
- bootstrap下拉菜单与滚动监视器学习笔记(2-2 下拉菜单--属性声明式方法(一))
- bootstrap下拉菜单与滚动监视器学习笔记(2-1 下拉菜单(Dropdown))
- bootstrap 实现弹出框popover,动态改变popover内容
- Bootstrap快速学习笔记(3)网格系统
- MIT 6.828 JOS学习笔记1. Lab 1 Part 1: PC Bootstrap
- Bootstrap输入建议库 autosuggest.js
- Bootstrap快速学习笔记(2)表单系列之二