Archive: Causes for Reboot & Manual button get displayed on FinishPage


Causes for the display of Reboot & Manual button on FinishPage
Hi Folks!

Yes, I'm back! Was not in touch for weeks due official tour and other assignments.

I'm yet to go through the threads started by me in the last 20 days. I'll definitely go through them and will revert to them. But in the meantime,here's one more new issue.

The senior most person from my management have reported that my installer has once worked peculiarly, though he was unable to reproduce the anomaly in front of me.

He is saying that my installer has displayed the option 'Reboot' and 'Manual' in the Finish page of the installation. I'm wondering how can it be, when I've not issued any such command! And the installer was working fine when I left. As per him, at that situation he selected the option 'manual'. And after the installation he run our application and discovered that the application is giving an error as the installer failed to register one of the ocx. This is the whole scenario, tell me why this thing happened for once only and he was unable to recreate this error again as the installer is working fine after that one time blunder.

In my knowledge knowingly, I've not used any commands related to reboot in my installer script. May be the installer is auto-checking the installation and activating this feature! During installation my installer uses the command DELETE and COPY for certain operations. Anything related to, if the operation is unsucessful?

Still these are the commands anything close to reboot in use:

Section "-Install ActiveX controls "
IfFileExists "$INSTDIR\MyApp.exe" 0 new_installation
StrCpy $ALREADY_INSTALLED 1
new_installation:
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED "AppDLLOCX\comdlg32.ocx" "$SYSDIR\comdlg32.ocx" "$SYSDIR"
SectionEnd

Section Uninstall
; plz. note the following line is commented!
; RMDir /r /REBOOTOK $INSTDIR

SectionEnd

Function .onRebootFailed
MessageBox MB_OK|MB_ICONSTOP "Reboot failed. Please reboot manually." /SD IDOK
FunctionEnd


With regards,






:)


The RegDll command (or an alternative like UpgradeDll_Func you might use) probably failed and set the RebootFlag TRUE. (See the help 4.9.11.2 SetRebootFlag, and 4.9.4.11 IfRebootFlag)

The Finish page displays the option your boss saw if that flag is set.

The dll might have failed to register because A) it depends upon other dlls that were not installed yet, or B) it needs a path variable that wasn't set yet, or C) another process was active and using an older copy of the dll, so the new one won't get copied into the directory until a reboot.

I struggled with this last week because my dlls needed the vc_redistributable dlls, but I installed those after mine. On the first install on a clean box, it wouldn't register them. second install worked (because the dependency was solved by then).

Don


Thanks Don for the reply. I've to leave office now, will check it tomorrow as per your suggestion. You've correctly deciphered my issue. Your second install worked like my boss's - how the 2nd time it works?