Old 18th April 2012, 14:25   #1
ehsansad
Junior Member
 
Join Date: Apr 2012
Posts: 22
Resume after reboot

Hello,

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

thanks,
ehsan
ehsansad is offline   Reply With Quote
Old 18th April 2012, 15:29   #2
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
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.
code:
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

The guy with the ridiculous username. Thou shall call him PaR instead.
Visit My Website
{_trueparuex^} is offline   Reply With Quote
Old 19th April 2012, 10:26   #3
ehsansad
Junior Member
 
Join Date: Apr 2012
Posts: 22
thanks
ehsansad is offline   Reply With Quote
Old 19th April 2012, 11:05   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
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
Afrow UK is offline   Reply With Quote
Old 21st May 2012, 01:39   #5
andyou111
Junior Member
 
Join Date: May 2012
Posts: 2
Quote:
Originally Posted by {_trueparuex^} View Post
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.
code:
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
andyou111 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