有没有办法跳过链中的一个包?我看过“InstallCondition”并且有这样的代码。
<ExePackage Id="RoboMongo"
DisplayName="RoboMongo"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="no"
Vital="no"
Name="redist\Robomongo-0.8.4-RC2-i386.exe"
DownloadUrl="$(var.RoboMongoUrl)"
InstallCondition="ComponentSelect_5"
InstallCommand='/Action=Install'
UninstallCommand="/Action=Uninstall"
RepairCommand ="/Action=Repair"
DetectCondition="RoboMongoInstalled">
<RemotePayload Description="????????? ????????????????? MongoDB"
Version ="0.8.4.2"
ProductName="RoboMongo"
Hash="71C17E48BC32304FA8724FFA7CA1C4C08891BC97" Size="7141182" />
Run Code Online (Sandbox Code Playgroud)
但我不想在 InstallCondition=false 上卸载它。我只想跳过它。
先感谢您。
如果您使用的是托管引导程序应用程序,则可以通过处理 PlanPackageBegin 事件来实现所需的行为。代码大致如下所示:
public MainViewModel(BootstrapperApplication bootstrapper)
{
bootstrapper.PlanPackageBegin += (sender, args) =>
{
if (bootstrapper.Engine.StringVariables["ShouldSkipPackage"] == "1")
if (args.PackageId == "RoboMongo")
args.State = RequestState.None;
};
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1372 次 |
| 最近记录: |