thenefield
Posts: 68
Joined: Thu Dec 06, 2007 6:19 pm

Resume installation

I have a custom action that I would like to force a reboot during the installation and then resume the installation where it left off once the user logs back in again.

My custom action is a vbs script which forces the reboot via the following command:

wshShell.Run "shutdown.exe -r -t 0 -f",0,True

However, the installer does not resume after reboot.

Is there a way I can accomplish this?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Resume installation

Hello,

I'm afraid we don't have built-in support for remembering the previous installation state in case of a reboot. However, as a workaround you can create another custom action which will get the path of your main setup (by accessing the SETUPEXEDIR property if you build an EXE setup or the SOURCEDIR property if you build an MSI setup) and write it in the "RunOnce" registry key. In this way the main setup will be launched again just after reboot. This custom action should be scheduled before your reboot custom action.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”