When the Bundle is started again after a restart the BOOTSTRAPPER_COMMAND
struct passed to your BootstrapperApplicationCreate
function contains a resumeType
field that will be set to BOOTSTRAPPER_RESUME_TYPE_REBOOT
. In managed code, the BootstrapperApplication
class contains a Command
property that contains the resume
field.
For example in managed code, to tell that your BootstrapperApplication
started after a restart, you can check:
if (BootstrapperApplication.Command.resume == ResumeType.Reboot)
{
// started after restart, go straight to Detect->Plan->Apply to finish the
// previous operation. BootstrapperApplication.Command.action will tell us
// the action to complete.
}
else
{
// started normally, show typical UI scenarios.
}