Search code examples
nsisuacwindowserror

NSIS UAC-Plugin - Unable to elevate with UAC off (error 1812)


Using the UAC-plugin in my NSIS-Installer, I want to give the user the possibility to enter an admin password. This works perfectly fine, except for when UAC is turned off. I then get an "Unable to elevate, error 1812". I get this error on Windows 7.

I tried to run the installer on a different computer, same error.

I also tried running the UAC_Basic example which comes with the UAC-plugin and get the same error, so I think it has nothing to do with the script I wrote.

I know it works for other installers (e.g. Dropbox), so I don't understand why it won't work for mine.

Thanks in advance for your help (:


Solution

  • You cannot really elevate when UAC is off. The plugin tries to detect this and presents its own RunAs dialog that tries to emulate WinXP. There was a bug with the dialog resources in the build that was on the wiki. I uploaded a new version that should fix the problems...