Prev Previous Post   Next Post Next
Old 10th February 2017, 11:46   #1
Junior Member
Join Date: Feb 2017
Posts: 19
Clear error level set by SetErrorLevel?

(this is my first post here)
I'm using the UAC plugin to elevate an inner instance in the installer.
As documented, the UAC plugin calls SetErrorLevel to whatever the result from the inner process is. The problem is, after the elevated instance terminates, I cannot clear the error level, and at some cases I display again the outer instance and need to return the error that corresponds to it (e.g. user pressed Cancel button).
I expected the installer to set another error level (1 on Cancel button press, etc.), but that doesn't happen.
Seems to me like an NSIS issue: it should overwrite the current error level on Cancel press, script error, etc.
Right now, if the error level is once set, it's forever - NSIS never owerwrites it.
I've tried
SetErrorLevel 0
SetErrorLevel ""

but that doesn't clear the error level and just always returns 0.

alexmitev is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

clear, seterrorlevel, uac

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