문제

Basically, I want to allow the user to restart his/her machine easily after the setup chain is complete. Just using <ExitCode ... after the last chain element is no option for me, because I do not want to force the user to restart and my last element is a MsiPackage, I simply want to give the user the option to restart, very quick.

Of course I could implement this feature in the Msi itself, but I also found this in a theme file of the bootstrapper:

<Page Name="Success">
    <Text X="186"
                Y="80"
                Width="-11"
                Height="30"
                FontId="2"
                DisablePrefix="yes">#(loc.SuccessHeader)</Text>
    <Button Name="LaunchButton"
                    X="-91"
                    Y="-11"
                    Width="75"
                    Height="23"
                    TabStop="yes"
                    FontId="0"
                    HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
    <Text Name="SuccessRestartText"
                X="186"
                Y="-51"
                Width="-11"
                Height="32"
                FontId="3"
                DisablePrefix="yes"
                HideWhenDisabled="yes">#(loc.SuccessRestartText)</Text>
    <Button Name="SuccessRestartButton"
                    X="-116"
                    Y="-11"
                    Width="100"
                    Height="23"
                    TabStop="yes"
                    FontId="0"
                    HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
    <Button Name="SuccessCancelButton"
                    X="-11"
                    Y="-11"
                    Width="100"
                    Height="23"
                    TabStop="yes"
                    FontId="0">#(loc.SuccessCloseButton)</Button>
</Page>

You see, there is a RestartText and RestartButton. When removing HideWhenDisabled I could see the elements after the setup, but they are still disabled obviously.

While in the wxs file is a SupressRepair tag in the bal:WixStandardBootstrapperApplication node to disable and hide the repair button and function, there even must be any option to enable the reboot text, button and function.

I could not determine where to set this. So, how can I enable the reboot text and button after the setup in the bootstrapp application.

Thanks in advise.

도움이 되었습니까?

해결책

Obviously, my solution was very easy and could be detected by myself when trying to reboot after MSI install:

When telling the MSI package to reboot after successful install by applying

<InstallExecuteSequence>
    <ScheduleReboot After="InstallFinalize"/>
</InstallExecuteSequence>

to my wxs file of my MSI project it will not cause the MSI to restart after the setup in the setup chain. Instead of that it will give the bootstrapper any return code so it enables my reboot text and button on the end of the whole setup chain.

I did not expect the bootstrapper is so intelligent. Nice!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top