Page 1 of 1

CD Autorun Example

Posted: Fri Mar 03, 2006 2:10 pm
by jimo
If I create an install package that requires a reboot and start that package from the CD Autorun example the CD Autorun dialog stays open because it does not respond to the system close request and subsequently no reboot. Am I doing something wrong?

Posted: Fri Mar 03, 2006 2:56 pm
by MichaelNesmith
Hi Jim

InstallAware windows can only be closed by the end-user - this is probably why the reboot is failing when Autorun is showing.

Posted: Mon May 07, 2007 2:16 pm
by hess_joel
So If I am reading this correctly, if there is a chance of the install requiring a restart, you shouldn't use the CD Autorun?

Is there anyway around this (besides using something else for the autorun)?

Posted: Mon May 07, 2007 3:02 pm
by jimo
Have any requirement write a file out to disk when it wants to reboot and then when program flow returns to the CD Autorun script check for that file if it exists issue a reboot and resume from the CD Autorun script, then on restart of that script check inside the file you write out for which executable wanted the restart and run that executable with out user intervention.

Posted: Mon May 07, 2007 3:09 pm
by hess_joel
The problem is that the user is asked via checkbox at the end of the install to "Reboot now". By then it's too late to write to a file. As far as I know, anything like writing to the registry or a file has to be done prior to the Apply Install action. The decision to restart doesn't occur until immediately before the user clicks Finish.

Posted: Mon May 07, 2007 3:12 pm
by jimo
Write to text file does not require apply install.
Put it right after the Display Dialog Finish inside the if block that checks for reboot and comment out the reboot command.

Posted: Tue May 08, 2007 12:58 am
by Tinus
I simply close CD Autorun after I have launched my installer:

Code: Select all

if Variable CHOICE Equals INSTALL
  Run Program $SFXPATH$\\install\\netman.exe
  Terminate Installation
end

..and a reboot is no problem any more.

Posted: Tue May 08, 2007 6:58 am
by jimo
Tinus is correct. I made the assumption that you have more than one install package that the users need to run so the CD AutoRun need to restart so they can make there next choice.