Archive: Confirmation for Download Abort


Confirmation for Download Abort
Hey guys!

I hope one of you can help me with a little problem I have with my installer.

When running the installer, it checks the users system, if a specific software that is required is installed. If it's not, a pop-up asks the user, whether he wants to download it now.
For the download I use the InetLoad plug-in, and everything seems to work fine.

But when the user cancels the download, I would like to have another pop-up first, that asks him, if he really wants to quit that download, and he gets to choose Yes or No.

Right now I only managed to prevent him from cancelling, or give the pop-up after the download has been cancelled, telling the user that he has to try again.
These solutions both are better than the default behaviour, but still not what I would like to see.

Where could I find a solution or tips to solve this problem?


Your need at least VS6. Find "case IDCANCEL:" in code and add add after first "break"

case IDCANCEL:
if(nocancel) break;
MessageBox(hDlg, "Are u sure u want to terminate download?", szCaption, MB_YESNO);
status = ST_CANCELLED;
and rebuild plug-in. May be later I'll add this option, looks usefull. And Inetc looks more stable for me (check parameters - small differences in CLI).

Thank you Takhir for your help!

It took me a while to figure out all the compile errors I got with VS C++ 2008 Express, but finally I managed to rebuild the plug-in, with this nice little extra Messagebox popping up, when someone wants to cancel the DL.

Yet I'm still a bit clueless, how I can than react onto the user input. Right now, it doesn't make a difference, what the user selects. The Download will be aborted after he answers the popup.

I would greatly appreciate if you could tell me, where I can find an answer to this problem, or maybe even some code snippet.

P.S.: Forgive these stupid questions, but I'm fairly new to NSIS


Sorry, I not tested this code :) Just check value MsgBox returns (replace line):
if(MessageBox(...) == IDNO) break;


Thank you again!

Now I've got everything working the way I want it to.
I really appreciate your efforts in helping me here