Archive: Resume after reboot


Resume after reboot
Hello,

Is it possible to resume the installation process after rebooting the system?

thanks,
ehsan


Yes, but there's no simple "do this" solution for it. You have to manage the resuming process yourself.

Basically, what you need to do is add an entry to HKCU\Software\Microsoft\Windows\Currentversion\Runonce, or in some other auto start key, that starts the installer on next start-up. Use some command-line switch so the installer knows it's resuming the install process.

E.g. This will start the installer on next start-up with "/resume" command-line switch.

WriteRegStr HKCU "Software\Microsoft\Windows\Currentversion\Runonce" "InstallResume" '"$EXEPATH" /resume'

You need to write code that checks if the installer was started with the command-line switch and then adjust the install process accordingly.

PaR

thanks


You may find it easier to put the 2nd part in another executable (i.e. another NSIS script) and extract that to temp. You can use the SelfDel plug-in to delete it on finish.

Stu


Originally posted by {_trueparuex^}
Yes, but there's no simple "do this" solution for it. You have to manage the resuming process yourself.

Basically, what you need to do is add an entry to HKCU\Software\Microsoft\Windows\Currentversion\Runonce, or in some other auto start key, that starts the installer on next start-up. Use some command-line switch so the installer knows it's resuming the install process.

E.g. This will start the installer on next start-up with "/resume" command-line switch.
WriteRegStr HKCU "Software\Microsoft\Windows\Currentversion\Runonce" "InstallResume" '"$EXEPATH" /resume'

You need to write code that checks if the installer was started with the command-line switch and then adjust the install process accordingly.

PaR
thanks... it very useful with me:cry: