View Single Post
Old 10th February 2017, 10:46   #1
alexmitev
Junior Member
 
Join Date: Feb 2017
Posts: 19
Clear error level set by SetErrorLevel?

Hello,
(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
code:
SetErrorLevel 0
SetErrorLevel ""


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

Regards,
Alex
alexmitev is offline   Reply With Quote