download - NSIS inetc multiple file cancel -
i'm using inetc plugin nsis download multiple files (50+)
everything seems working fine except 1 little annoyance @ point
when part files being downloaded, unable abort installer.
the 'x' @ top right hand of installer (windows close) greyed out. inetc plugin has 'cancel' button, cancels download of current file, causing installation package resume next.. +50 files in queue, annoyance , way around end task process
to call inetc::get
have created function called downloadfile
validations , takes filename argument
i call in following manner
strcpy $batchfile "filename.fileextension" call downloadfile
essentially, i'd know how can use inetc download multiple files while not preventing user being able abort installation entirely
edit: downloadfile code
function downloadfile iffileexists "$exedir\$targetfolder\$batchfile" +1 md5dll::getmd5file "$exedir\$targetfolder\$batchfile" pop $0 strcpy $md5file $0 push "$exedir\$targetfolder\$batchfile" push "\" call getafterchar pop $r0 strcpy $filename $r0 push $filename call getbasename pop $2 strcpy $noextfile $2 ${if} $noextfile != $md5file setdetailsview show detailprint "file $batchfile doesnt exit or md5 faulty. re-downloading" inetc::get /resume "do want retry?" "[url]/$batchfile" "$exedir\$targetfolder\$batchfile" ${else} detailprint "file $batchfile exists, md5 good" ${endif} sleep 2000 functionend
call inetc::get in loop, once each file. if return value popped off stack not "ok" abort loop.
Comments
Post a Comment