Old 19th August 2003, 15:50   #1
crisp
Junior Member
 
Join Date: May 2001
Location: Romania
Posts: 25
Send a message via Yahoo to crisp
Abort installer

Hi.
I have the following situation:
In my installer I have a custom page which sets some parameters for an external program that I have to run.
On the leave function of this custom page I run the program, check the output and if any error occured I call abort.
This doesn't let me to go to the next page.
As this is a critical error I want to cancel completly the install process. Maybe displaying a message and then exit the installer.
Any ideeas on how to do that ?

Thanks,

Crisp
crisp is offline   Reply With Quote
Old 19th August 2003, 16:46   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Abort makes you go back to the page being left, so just not call Abort if you want to continue.

-Stu
Afrow UK is offline   Reply With Quote
Old 19th August 2003, 17:44   #3
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
The Abort command behaves differently when you use it in a "leave" function.
You could move the code that runs the external program and does the checking into the function that creates the custom page (put it after the InstallOptions line). Then you can use Abort (in the "custom page" function) to cancel the installation.
pengyou is offline   Reply With Quote
Old 19th August 2003, 18:23   #4
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Quote:
As this is a critical error I want to cancel completly the install process. Maybe displaying a message and then exit the installer.
Use MessageBox command, and after, the Quit command.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 19th August 2003, 18:34   #5
crisp
Junior Member
 
Join Date: May 2001
Location: Romania
Posts: 25
Send a message via Yahoo to crisp
Thanks for the tips !
Actually I think handle the error after InstallOption it's maybe a better idea.
I new there must a "quit" command but i guess i forgot about it.

Crisp
crisp 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