Old 25th November 2006, 14:43   #1
TJK
Junior Member
 
Join Date: Jun 2006
Posts: 17
Intercepting/Replacing Reboot action from "Finish" page

I have an NSIS installer that is invoked by a Vendor .DLL called from an OEMSETUP.INF PnP installer.

The PnP wizard waits for the NSIS program to complete and if the NSIS installer requires a reboot and the user selects to do so then the PnP wizard doesn't get to complete and concludes there was an error, which it reports to the user.

If I could intercept the reboot action (presuming that it was selected on the "Finish" page by the user) and replace it with another action (thinking of running a separate .EXE in another thread which will do the reboot shortly after the NSIS installer closes) then the PnP Wizard would be happy (because it would have regained control after the NSIS installer finishes and before the reboot occurs) and the reboot would still occur.

Only way I've thought of doing it ATM is to force SetRebootFlag=FALSE while noting it was TRUE in a user variable and then tailor the none rebooting "Finish" page so that it looks like a Rebooting page to the user but the options are processed by my script (in a leave function for the finish page) so it can launch the separate rebooting .EXE - but if there's a way to catch the normal NSIS reboot action and redirect it that might be easier.

Hope I've managed to explain that reasonably clearly!

Thanks in advance for any suggestions.

Tim
TJK is offline   Reply With Quote
Old 25th November 2006, 15:15   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
If you have access to the script, SetRebootFlag would be the simplest method. If you don't, you can deny the reboot by handling WM_QUERYENDSESSION. In this case, the script will execute .onRebootFailed and exit cleanly.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 2nd December 2006, 17:55   #3
TJK
Junior Member
 
Join Date: Jun 2006
Posts: 17
Thanks kichik, I have the script so I'll use SetRebootFlag.

Tim
TJK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump