Yes, that code. You need to pass the correct handle to the window instead
of IntPtr.Zero.


On Sat, Apr 6, 2013 at 9:20 AM, phoenix <fy24h.hu...@gmail.com> wrote:

> Thanks for your kindness, rob
>
> Your mean this:
>
> /* mycode */
>
>   /// <summary>
>         /// Method that gets invoked when the Bootstrapper PlanComplete
> event is fired.
>         /// If the planning was successful, it instructs the Bootstrapper
> Engine to
>         /// install the packages.
>         /// </summary>
>         private void OnPlanComplete(object sender, PlanCompleteEventArgs e)
>         {
>             if (e.Status >= 0)
>                 Bootstrapper.Engine.Apply(System.IntPtr.Zero);
>         }
>
> Sorry my poor english.
>
> Repeat my problem again,
> 1.  I click CustomBootstrapperSetup.exe
> 2.  The custom WPF UI show because .net has been installed.
>     The custom WPF UI has two buttons, the name of one is install , the
> other is cancel
> 3.  I click Install button, the internal UI of  StandardSetup.msi will show
>    Log:  [0664:0F90][2013-04-07T00:09:03]i301: Applying execute package:
> CRMInstall, action: Install, path: C:\ProgramData\Package
>
> Cache\{E7F8B898-E7D5-43FE-ABAF-9BE02516879A}v1.0.0.0\Packages\StandardSetup.
> msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7"'
>
> 4. So far I have two UI on the screen
>   My Problem is the internal ui below the wpf ui. The internal ui will be
> hided by the wpf ui.
>
> How to set the internal ui to display at the top of window
>
>
> My complete code as follows:
>
> CustomBootstrapperApplication.cs
> public class CustomBootstrapperApplication : BootstrapperApplication
>     {
>         // global dispatcher
>         static public Dispatcher BootstrapperDispatcher { get; private set;
> }
>
>         protected override void Run()
>         {
>             this.Engine.Log(LogLevel.Verbose, "Launching custom UX");
>             BootstrapperDispatcher = Dispatcher.CurrentDispatcher;
>
>             MainViewModel viewModel = new MainViewModel(this);
>             viewModel.Bootstrapper.Engine.Detect();
>
>             MainView view = new MainView();
>             view.DataContext = viewModel;
>             view.Closed += (sender, e) =>
> BootstrapperDispatcher.InvokeShutdown();
>             view.Show();
>
>             Dispatcher.Run();
>
>             this.Engine.Quit(0);
>         }
>
>     }
>
> MainViewModel.cs
>
>         public MainViewModel()
>         {
>             InitialComponentStatus();
>         }
>
>         public BootstrapperApplication Bootstrapper { get; private set; }
>         public MainViewModel(BootstrapperApplication bootstrapper)
>             : this()
>         {
>             this.Bootstrapper = bootstrapper;
>             this.Bootstrapper.DetectPackageComplete +=
> this.OnDetectPackageComplete;
>             this.Bootstrapper.PlanComplete += this.OnPlanComplete;
>             this.Bootstrapper.ApplyComplete += this.OnApplyComplete;
>         }
>
>         private void OnDetectPackageComplete(object sender,
> DetectPackageCompleteEventArgs e)
>         {
>             if (e.PackageId == "NetFx40Full")
>             {
>                 Net40Present = e.State == PackageState.Present;
>
>                 //else if (e.State == PackageState.Present)
>                 //    UninstallEnabled = true;
>             }
>         }
>
>         /// <summary>
>         /// Method that gets invoked when the Bootstrapper PlanComplete
> event is fired.
>         /// If the planning was successful, it instructs the Bootstrapper
> Engine to
>         /// install the packages.
>         /// </summary>
>         private void OnPlanComplete(object sender, PlanCompleteEventArgs e)
>         {
>             if (e.Status >= 0)
>                 Bootstrapper.Engine.Apply(System.IntPtr.Zero);
>         }
>
>
>         /// <summary>
>         /// Method that gets invoked when the Bootstrapper ApplyComplete
> event is fired.
>         /// This is called after a bundle installation has completed. Make
> sure we updated the view.
>         /// </summary>
>         private void OnApplyComplete(object sender, ApplyCompleteEventArgs
> e)
>         {
>             InstallEnabled = false;
>             //UninstallEnabled = false;
>         }
>
>         private void InitialComponentStatus()
>         {
>             IIS6Present =
>
> InternetInformationServicesDetection.IsInstalled(ConstantEnum.InternetInform
> ationServicesVersion.IIS6);
>             IIS7Present =
>
> InternetInformationServicesDetection.IsInstalled(ConstantEnum.InternetInform
> ationServicesVersion.IIS7);
>
>             Sql2008Present =
> SqlServerDetection.IsInstalled(ConstantEnum.SqlServerVersion.Sql2008);
>             Sql2012Present =
> SqlServerDetection.IsInstalled(ConstantEnum.SqlServerVersion.Sql2012);
>         }
>
>         private void InstallExecute()
>         {
>             Bootstrapper.Engine.Log(LogLevel.Verbose, "Lauch
> InstallExecute()");
>
>             Bootstrapper.Engine.Plan(LaunchAction.Install);
>         }
>
>
> -----邮件原件-----
> 发件人: Rob Mensching [mailto:r...@robmensching.com]
> 发送时间: 2013年4月6日 23:08
> 收件人: General discussion for Windows Installer XML toolset.
> 主题: Re: [WiX-users] Burn DisplayInternalUI z-order has problem
>
> Make sure you pass a handle to your Bootstrapper Application window to
> Apply().
>
>
> On Sat, Apr 6, 2013 at 7:27 AM, feng huang <fy24h.hu...@gmail.com> wrote:
>
> > Dear all,
> >
> >
> > I have write a custom bootstrapper use wpf, it will show some
> > prerequisites.  everything is ok. but when click install , the
> > msipackage internal ui showed behind of wpf ui.
> >
> > how to set the internal ui to topmost , thank you!
> >
> > *my bundles.wxs as follows:*
> >      <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
> >             <PayloadGroupRef Id="InstallerPayload"/>
> >         </BootstrapperApplicationRef>
> >
> >         <Chain>
> >             <PackageGroupRef Id="NetFx40Full"/>
> >             <PackageGroupRef Id="InstallerPackages"></PackageGroupRef>
> >         </Chain>
> >     </Bundle>
> >
> >     <Fragment>
> >         <PayloadGroup Id="InstallerPayload">
> >             <Payload
> > SourceFile="..\CustomBootstrapper\bin\release\MahApps.Metro.dll"/>
> >             <Payload
> >
> >
>
> SourceFile="..\CustomBootstrapper\bin\release\System.Windows.Interactivity.d
> ll"/>
> >             <Payload SourceFile
> > ="..\CustomBootstrapper\bin\release\CustomBootstrapper.dll"/>
> >             <Payload
> > SourceFile="..\CustomBootstrapper\BootstrapperCore.config" />
> >             <Payload SourceFile="C:\Program Files (x86)\WiX Toolset
> > v3.7\SDK\Microsoft.Deployment.WindowsInstaller.dll"/>
> >         </PayloadGroup>
> >     </Fragment>
> >
> >     <Fragment>
> >         <PackageGroup Id="InstallerPackages">
> >             <!--<MsiPackage Id="CRMInstall" Vital="yes"
> >  Name="Packages\SetupProject1.msi"
> SourceFile="Packages\SetupProject1.msi"
> > DisplayInternalUI="yes">-->
> >             <MsiPackage Id="CRMInstall" Vital="yes"
> >  Name="Packages\StandardSetup.msi"
> > SourceFile="..\StandardSetup\bin\Release\StandardSetup.msi"
> > DisplayInternalUI="yes">
> >
> >             </MsiPackage>
> >         </PackageGroup>
> >     </Fragment>
> >
> > Sincerely
> > Phoenix
> >
> > ----------------------------------------------------------------------
> > -------- Minimize network downtime and maximize team effectiveness.
> > Reduce network management and security costs.Learn how to hire the
> > most talented Cisco Certified professionals. Visit the Employer
> > Resources Portal
> > http://www.cisco.com/web/learning/employer_resources/index.html
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> >
>
> ----------------------------------------------------------------------------
> --
> Minimize network downtime and maximize team effectiveness.
> Reduce network management and security costs.Learn how to hire the most
> talented Cisco Certified professionals. Visit the Employer Resources Portal
> http://www.cisco.com/web/learning/employer_resources/index.html
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> ------------------------------------------------------------------------------
> Minimize network downtime and maximize team effectiveness.
> Reduce network management and security costs.Learn how to hire
> the most talented Cisco Certified professionals. Visit the
> Employer Resources Portal
> http://www.cisco.com/web/learning/employer_resources/index.html
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to