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

Mid-install reboot


1 reply to this topic

pdriley

pdriley
  • Members
  • 91 posts

Posted 18 December 2003 - 21:10

I give up! I need help.

I need to be able to uninstall a legacy ISPro installation at the beginning of the Windows Installer installation, retaining certain setup files and such, rebooting if necessary and then automatically continuing the installation.

I have this all working EXCEPT that I can't find a reliable way of resuming the installation with all the user settings after the reboot (I'm using ERROR_INSTALL_SUSPEND after setting the REBOOTNOW mode).

I'm currently building a big /qb commandline based on the original commandline and putting that into the RunOnce key. That works fine on Win 9X, less so on NT-series (because GetCommandLine doesn't return the original commandline, it returns "C:\...\msiexec.exe -Embedded " and then a string of seemingly hex characters.

It works and looks great on Win 9X, except that I keep thinking of things the user can change that I need to pass back to the resumed installation. I don't think I can even do that if they select specific features rather than using INSTALLLEVEL.

There must be a better way. There must be a commandline switch that says "resume after reboot". Mustn't there?

Can anyone help me?
Paul Riley (Vector Networks), InstallShield User.

Neo

Neo
  • Members
  • 48 posts

Posted 19 December 2003 - 02:49

Which sequence are you rebooting. If you are rebooting in the InstallExecute sequence, you might as well do it with the ForceReboot action. This will automatically add the msiexec.... to the runonce key. It will additionally set the value of AFTERREBOOOT property to 1 using command line. The settings should be saved after the reboot and the installation will start again. You can condition certain actions using the AFTERREBOOT property. Also donot forget to condition the ForceReboot action itself. Or the setup will keep rebooting. One flip side of using ForceReboot is that, it needs to be placed between InstallInitialize and InstallFinalize in the InstallExecute Sequence.

Alternatively you can write an InstallScript custom action to write the path of the setup.exe to the RunOnce key. The path to the setup.exe would be stored in the SETUPEXEDIR property. And finally, at the risk of stating the obvious, u can use System(SYS_BOOTMACHINE) statement to reboot.

Hope this helps.