Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 28th January 2008, 14:05   #1
sj83
Junior Member
 
Join Date: Jan 2008
Posts: 3
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?
sj83 is offline   Reply With Quote
Old 28th January 2008, 14:48   #2
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
Your need at least VS6. Find "case IDCANCEL:" in code and add add after first "break"
code:
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).
Takhir is offline   Reply With Quote
Old 30th January 2008, 11:08   #3
sj83
Junior Member
 
Join Date: Jan 2008
Posts: 3
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
sj83 is offline   Reply With Quote
Old 31st January 2008, 05:56   #4
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
Sorry, I not tested this code Just check value MsgBox returns (replace line):
if(MessageBox(...) == IDNO) break;
Takhir is offline   Reply With Quote
Old 31st January 2008, 06:39   #5
sj83
Junior Member
 
Join Date: Jan 2008
Posts: 3
Thank you again!

Now I've got everything working the way I want it to.
I really appreciate your efforts in helping me here
sj83 is offline   Reply With Quote
Reply
Go Back   Winamp 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