Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   How to catch cancel action of ExecWait "DotNet20.fx.exe"' $0 (http://forums.winamp.com/showthread.php?t=280994)

flyingleaf 8th November 2007 01:18

How to catch cancel action of ExecWait "DotNet20.fx.exe"' $0
 
I saw many guys talked about Execwait issue, but no one talk about cancel issue. My issue is that: When installing DotNet 2.0 framework, user clicks cancel to cancel framework install process, how can I get the cancel exception. My NSIS code is like this:
Installed:
ClearErrors
Execwait '"$EXEDIR\DotNet20.fx.exe"' $0
IfErrors 0 done
Messagebox MB_YESNO|MB_ICONQUESTION "Do you want to cancel setup?" IDYES 0 IDNO Installed
Abort
done:

But user cancel install framework, there is no error be catched at 'IfErrors 0 done'. Thank you very much for your help.

pospec 8th November 2007 05:42

Can't you just try to check for .net version after ExecWait?

Afrow UK 8th November 2007 09:40

The error flag will not be set. You need to check the value of $0. 0 is success and anything else is (usually) failure.

Stu

flyingleaf 9th November 2007 05:10

Thanks both of you. I take the methods of get version again.
:D


All times are GMT. The time now is 04:37.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.