Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Force Reboot @ Front-end of Install


6 replies to this topic

Superfreak3

Superfreak3
  • Full Members
  • 437 posts

Posted 09 May 2003 - 15:12

I'd like to force a reboot during the UI Sequence of my install. I know there are restrictions on ForceReboot that prevent me from using it at the desired time.

Is there any way around this?

I created a small install using the ScheduleReboot action, which causes the installation to reboot at the end. This installation is a single .msi file that is called from SOURCEDIR via a custom action in my main install. This CA is sequenced in the UI Sequence of my main install.

All looked good as I was prompted to reboot, but my install thread from the main install was ended. In other words, my main install did not continue after the reboot of the called child install.

Again, is there any way around this?

Any info. would be MAJORLY helpful!

Thanks!

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 12 May 2003 - 05:27

If you need a reboot in your UI sequence, couldnt you just pop up a message to get the user to reboot the PC?

Superfreak3

Superfreak3
  • Full Members
  • 437 posts

Posted 12 May 2003 - 14:57

Yeah, we thought about doing that or even highlighting this request in the accompanying documentation, but we wanted to make sure they actually did it by forcing it.

If it's not possible, we may have to go this route.

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 14 May 2003 - 08:31

You might be able to run an msi MsiProcessMessage to make a reboot, but if not, there must a Windows API functino to force a reboot. You could run this after popping up a dilaog message or something along those lines.

AdamBell

AdamBell
  • Members
  • 21 posts

Posted 14 May 2003 - 11:44

Superfreak3,

Use the ForceReboot Action with a conditional statement so that it's only triggered when neccessary. If the installation is in UI mode then the user is prompted (the install is halted until the user responds). No UI no warning and the reboot is silent.

There is an AFTERREBOOT property to help you post reboot. The Installer is kicked off again by the RunOnceKey with the command line setting the AFTERREBOOT property to a value of 1.

Hope this helps.

Cheers

Adam :-)



Superfreak3

Superfreak3
  • Full Members
  • 437 posts

Posted 19 May 2003 - 15:21

So, I run my nested install, which I would like to set to run in the absence of a file on the target machine (or, should I condition the ForceReboot within the child installation to execute only if file is absent?). If file A is absent, the nested install will run causing the reboot.

Should I set the RunOnceKey (in the nested/chile install?) in some way as to call the main installation again following the reboot. If I can do this, how do I prevent the child install from executing and/or the ForceReboot action within the nested install from firing again? The file, which will be the conditional trigger, will not be installed until after the nested install in the UI sequence. Therefore, this mignt create a loop (Run my main install, file absent so child/ForceReboot fires, reboot, main install fires again, child will execute again because file still not there, etc...).

Is this where AFTERREBOOT comes in?

AdamBell

AdamBell
  • Members
  • 21 posts

Posted 22 May 2003 - 11:43

Hey mate,

So let me see if Im up to speed:

You have a main install, if a file is missing, a CA kicks off a child MSI (from the same location as the parent, i.e. external to the parent MSI?). The child requires a reboot at the end, and then you need the parent to continue it's installation?

I guess it depends on whether you can suppress the reboot in the child until the end of the parent install? That would be the easiiest and nice and tidy.

If you can suppress, but the reboots needed before you can continue, then it get's complication :
1) Use Appsearch logic to locate your file (or not).
2) If AppSearch Prop is False then kick off the Child MSI and Suppress the reboot at the end.
3) Use a custom action in the Parent MSI directly after the Childs CA so that the FORCEREBOOT is actioned if the Appsearch Property is False.
4) Condition any further actions in the Parent to AppSearch is True or AFTERREBOOT = 1

I've never had an app that had to be done this way. Suppressing the reboot has always been fine. I'd be interested to hear how it goies?

Cheers

Adam :-)