UAC plugin: strange behaviour when UAC is off and installer is run from browser
I stumbled upon some strange behaviour when running downloaded installer from different browsers.
The problem is as follows:
I switch off UAC and do not reboot the computer.
Run the installer, choose install path which requires admin rights. UAC is run.
Installer shows "Run as" dialog. Select "Current user".
If I do all this running the downloaded installer from Windows Explorer, or from Internet Explorer or Firefox browsers (after downloading it), the following check works:
Function .onInit
${If} ${UAC_IsInnerInstance}
${IfNot} ${UAC_IsAdmin}
SetErrorLevel 0x666666 ;couldn't elevate
Quit
${EndIf}
${EndIf}
...
Then, this error level is returned after running
!insertmacro UAC_RunElevated
in $2 to the outer instance and I can check for it.
if I run the downloaded installer from Chrome, inner instance .onInit doesn't get called and the value in $2 is 2. This value is similar to NSIS return value "aborted by script".
I wonder why this can happen and what can I do to handle this situation. Would greatly appreciate your ideas.