You can also return IDRESTART from OnShutdown().

On Mon, Oct 1, 2012 at 8:44 AM, Henning Krause <m...@henningkrause.eu>wrote:

> Hi,
>
>  I have created a managed bootstrapper using burn which installs one to
> three MSIs. One of the packages might require a restart of the system.
>
> What I now do is this:
>
> private void ApplyComplete(object sender, ApplyCompleteEventArgs e)
>                 {
>                         // ..
>                         if (e.Restart == ApplyRestart.RestartInitiated ||
> e.Restart == ApplyRestart.RestartRequired)
>                         {
>                                 IsRebootRequired = true;
>                                 e.Result = Result.Restart;
>                         }
>                         // ...
>                 }
>
> So, in the OnApplyComplete event I basically tell Burn to restart.
>
> However, this is not very user friendly, as the user might want to delay
> the restart.
>
> One solution would be to pop up a message box asking the user whether he
> wants to restart the computer now or later. But I find that this is not the
> optimal solution.
>
> Ideally, main window of the installer should just state that the
> installation was successful but a restart is required. It would contain a
> checkbox, which the user could check to indicate that he wants to restart
> the computer immediately.
>
> The problem is, that I can't tell burn to restart the computer. The only
> way I know is the Result property in the OnApplyComplete handler. But that
> method is long gone...
>
> Is there another way to tell burn to restart the computer? Or do I have to
> implement that on my own?
>
> Kind regards,
> Henning Krause
>
>
>
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>



-- 
virtually,

   Rob Mensching
   http://RobMensching.com LLC
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to