Hi all,
i am a newbie on NSIS and need to provide File Resume features in an installer.
We simply want to dl files from web and, in case the installer has been quit abnormally or download was not successfull, we want to resume files, that is, checking if the file exists and, if it exists, check for its size and dl it again.
Is there any implemented feature of NSIS to do this or can someone give a hint how to do it?
Thanks for your help in advance.
cheers.
alex
Resuming files after dl
5 posts
Possible:
1. NSISdl plugin.
2. IfFileExists instruction.
1. NSISdl plugin.
2. IfFileExists instruction.
Hi,
thats what i am actually doing. I may had added the code i am using. Here it is:
addsize 600
IfFileExists "Diary.mp3" Resume
MessageBox MB_YESNO "File already exists! Do you want
to overwrite Diary.mp3" IDYES Install IDNO Resume
Install:
Dialer::AttemptConnect
NSISdl::download
http://www.kq9.org/temp/Diary.mp3 "$INSTDIR\Diary.mp3"
DetailPrint "Installation details..."
SetOutPath "$INSTDIR"
Resume:
If file exists, we go to resume. What i wanted is reload the installer automatically, when it has to. That is, when i started dl and something abnormally happaned, i wanted to restart dl again automatically without interference of the user.
Thanks again for help.
thats what i am actually doing. I may had added the code i am using. Here it is:
addsize 600
IfFileExists "Diary.mp3" Resume
MessageBox MB_YESNO "File already exists! Do you want
to overwrite Diary.mp3" IDYES Install IDNO Resume
Install:
Dialer::AttemptConnect
NSISdl::download
http://www.kq9.org/temp/Diary.mp3 "$INSTDIR\Diary.mp3"
DetailPrint "Installation details..."
SetOutPath "$INSTDIR"
Resume:
If file exists, we go to resume. What i wanted is reload the installer automatically, when it has to. That is, when i started dl and something abnormally happaned, i wanted to restart dl again automatically without interference of the user.
Thanks again for help.
Did you try re-calling the plugin?
Use a label or goto statment for this.
Use a label or goto statment for this.
The first error there, is you are using IfFileExists on a non exact path. You need to tell it EXACTLY what path to check.
IfFileExists "Diary.mp3" Resume
Should be:
IfFileExists "$INSTDIR\Diary.mp3" Resume
-Stu
IfFileExists "Diary.mp3" Resume
Should be:
IfFileExists "$INSTDIR\Diary.mp3" Resume
-Stu