21

In some of the NSIS Installer documentation, it says that if some operation fails, the error flag will be set. Is the error flag just a boolean value or is a specific code that indicates what error occurred? If it is a code, how do I access it to log it out?

Jeff Storey
  • 56,312
  • 72
  • 233
  • 406

1 Answers1

21

It is just a boolean flag, use ClearErrors, IfErrors and SetErrors to clear/detect/set it. (This flag is set by the internal instructions, most plugins use other methods but it is also possible for a plugin to set/clear it)

Anders
  • 97,548
  • 12
  • 110
  • 164
  • 2
    Thanks. Is there a way to actually figure out what went wrong? I'm getting an empty value reading an existent registry key. – Jeff Storey Mar 29 '12 at 21:25
  • @JeffStorey: Not really, you can try the NSIS logging build ( http://nsis.sourceforge.net/Special_Builds ) but for file/registry issues like this I usually recommend trying Process Monitor first... – Anders Mar 29 '12 at 21:40