/// <summary> /// when engine detects a package, populate the appropriate local objects, /// including current installed state of the package on the system /// </summary> private void SetPackageDetectedState(Wix.DetectPackageCompleteEventArgs args) { var package = this.BundlePackages.FirstOrDefault(pkg => pkg.Package == args.PackageId); if (package != null) { Wix.PackageState currentState = args.State; package.CurrentInstallState = currentState; } }
/// <summary>Called when the detection for a specific package has completed.</summary> /// <param name="args">The arguments of the event.</param> protected override void OnDetectPackageComplete(Wix.DetectPackageCompleteEventArgs args) { this.LogBootstrapperEnterEvent(args, "DetectPackageComplete"); WPFBootstrapperEventArgs <Wix.DetectPackageCompleteEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.DetectPackageCompleteEventArgs>(args); this.TryInvoke(new Action(() => { this.model.OnDetectPackageComplete(cancelArgs); })); if (!cancelArgs.Cancel) { base.OnDetectPackageComplete(cancelArgs.Arguments); } this.LogBootstrapperLeaveEvent(null, "DetectPackageComplete"); }
/// <summary>Called when the detection for a specific package has completed.</summary> /// <param name="args">The arguments of the event.</param> protected override void OnDetectPackageComplete(Wix.DetectPackageCompleteEventArgs args) { LogVerbose("Enter Method: OnDetectPackageComplete"); WPFBootstrapperEventArgs <Wix.DetectPackageCompleteEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.DetectPackageCompleteEventArgs>(args); TryInvoke(new Action(() => { _mainWindow.OnDetectPackageComplete(cancelArgs); })); if (!cancelArgs.Cancel) { base.OnDetectPackageComplete(cancelArgs.Arguments); } LogVerbose("Leaving Method: OnDetectPackageComplete"); }
/// <summary> /// Method that gets invoked when the Bootstrapper DetectPackageComplete event is fired. /// Checks the PackageId and sets the installation scenario. The PackageId is the ID /// specified in one of the package elements (msipackage, exepackage, msppackage, /// msupackage) in the WiX bundle. /// </summary> void ManagedBA_DetectPackageComplete(object sender, DetectPackageCompleteEventArgs e) { if (e.PackageId == "MyProduct") { if (e.State == PackageState.Absent) { MessageBox.Show("Installing"); this.Engine.Plan(LaunchAction.Install); } else if (e.State == PackageState.Present) { MessageBox.Show("UnInstalling"); this.Engine.Plan(LaunchAction.Uninstall); } } }
/// <summary> /// Method that gets invoked when the Bootstrapper DetectPackageComplete event is fired. /// Checks the PackageId and sets the installation scenario. The PackageId is the ID /// specified in one of the package elements (msipackage, exepackage, msppackage, /// msupackage) in the WiX bundle. /// </summary> private void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e) { if (e.PackageId == "DummyInstallationPackageId") { if (e.State == PackageState.Absent) InstallEnabled = true; else if (e.State == PackageState.Present) UninstallEnabled = true; } }
/// <summary> /// Method that gets invoked when the Bootstrapper DetectPackageComplete event is fired. /// Checks the PackageId and sets the installation scenario. The PackageId is the ID /// specified in one of the package elements (msipackage, exepackage, msppackage, /// msupackage) in the WiX bundle. /// </summary> void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e) { if (e.PackageId == "SonarQubePackage") { if (e.State == PackageState.Absent) { this.LaunchAction = LaunchAction.Install; } else if (e.State == PackageState.Present) { this.LaunchAction = LaunchAction.Uninstall; } else if (e.State == PackageState.Obsolete) { this.SetupState = SetupState.FailedOnDowngrade; } autoEvent.Set(); } }
void DetectedPackage(object sender, DetectPackageCompleteEventArgs e) { if (e.PackageId.Equals("Firesec", StringComparison.Ordinal)) { _root.State = (e.State == PackageState.Present) ? InstallationState.DetectedPresent : InstallationState.DetectedAbsent; } }
/// <summary> /// Called when the detection for a specific package has completed. /// </summary> /// <param name="args">Additional arguments for this event.</param> protected virtual void OnDetectPackageComplete(DetectPackageCompleteEventArgs args) { EventHandler<DetectPackageCompleteEventArgs> handler = this.DetectPackageComplete; if (null != handler) { handler(this, args); } }
/// <summary> /// Method that gets invoked when the Bootstrapper DetectPackageComplete event is fired. /// Checks the PackageId and sets the installation scenario. The PackageId is the ID /// specified in one of the package elements (msipackage, exepackage, msppackage, /// msupackage) in the WiX bundle. /// </summary> private void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e) { if (e.PackageId == "SparrowChartPackageId") { if (e.State == PackageState.Absent) { InstallEnabled = true; this.IsLicensePage = true; } else if (e.State == PackageState.Present) { UninstallEnabled = true; this.IsUnInstallPage = true; } } }
private void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e) { }
/// <summary> /// Method that gets invoked when the Bootstrapper DetectPackageComplete event is fired. /// Checks the PackageId and sets the installation scenario. The PackageId is the ID /// specified in one of the package elements (msipackage, exepackage, msppackage, /// msupackage) in the WiX bundle. /// </summary> void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e) { if (e.PackageId == PrimaryPackageId) { if (e.State == PackageState.Absent) { this.Engine.Plan(LaunchAction.Install); } else if (e.State == PackageState.Present) { this.Engine.Plan(LaunchAction.Uninstall); } } }
private void DetectedPackage(object sender, DetectPackageCompleteEventArgs e) { //Bootstrapper.Model.Bootstrapper.Engine.Log(LogLevel.Verbose, "Entering InstallationViewModel.DetectedPackage()"); //Bootstrapper.Model.Bootstrapper.Engine.Log(LogLevel.Verbose, string.Format(" e.PackageID = '{0}' is {1}", e.PackageId, (e.State == PackageState.Present) ? "Present" : "Absent")); //if (e.PackageId.Equals("Wix", StringComparison.Ordinal)) _root.State = (e.State == PackageState.Present) ? InstallationState.DetectedPresent : InstallationState.DetectedAbsent; //Bootstrapper.Model.Bootstrapper.Engine.Log(LogLevel.Verbose, "Leaving InstallationViewModel.DetectedPackage()"); }
void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e) { InstallEnabled = true; UninstallEnabled = true; }
void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e) { if (e.PackageId == "FiresecId_1") { if (e.State == PackageState.Absent) IsInstallEnabled = true; else if (e.State == PackageState.Present) IsUninstallEnabled = true; } }
private void DetectedPackage(object sender, DetectPackageCompleteEventArgs e) { // The Package ID from the Bootstrapper chain. if (e.PackageId.Equals("SampleApp", StringComparison.Ordinal)) { this.State = (e.State == PackageState.Present) ? InstallationState.DetectedPresent : InstallationState.DetectedAbsent; } }