Page 1 of 1

Feature request in Installer.ahk

Posted: 08 May 2020, 16:13
by malcev
I think that to check if UAC is enabled is not needed.

Code: Select all

RegRead UACIsEnabled, HKLM, SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System, EnableLUA
It is logically always to display option "Run with UI Access" when install.

Re: Feature request in Installer.ahk

Posted: 27 May 2020, 04:26
by lexikos
If UAC is not enabled, the "Run as administrator" option does not work. Worse, I think it runs the script without any kind of elevation or any indication that it have failed to elevate. Other executable file types which have this option behave the same way. "Run with UI Access" runs the script using a different executable file, but again has no real effect. Without UAC, there are no restrictions for UI Access to bypass.

Fortunately, it's uncommon for UAC to be fully disabled on Windows 8 and later. I think disabling UAC (via EnableLUA) used to breaks apps and the Start screen. I'm not sure what effect it has on Windows 10.

In Windows 8 and later, setting UAC to "never notify" via Control Panel only turns off the notifications, not UAC itself.

The check also serves to avoid creating those context menu items on Windows XP and older.

Re: Feature request in Installer.ahk

Posted: 27 May 2020, 04:40
by malcev
I set UAC to "never notify" via Control Panel and as a result have got EnableLUA = 0. (Windows 10 LTSC 1809)
lexikos wrote:
27 May 2020, 04:26
Without UAC, there are no restrictions for UI Access to bypass.
There are restriction for using CreateWindowInBand function:
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75695

Re: Feature request in Installer.ahk

Posted: 27 May 2020, 05:06
by lexikos
Putting aside the undocumented function, what effect does "Run as administrator" and "Run with UI Access" have for you with EnableLUA = 0?

Re: Feature request in Installer.ahk

Posted: 27 May 2020, 05:22
by lexikos
I set UAC to "never notify" via Control Panel and yet EnableLUA is still 1, on Windows 10.0.19555 (version 2004). This reaffirms my belief that the setting in Control Panel has no effect on this registry value on Windows 8 and later. Perhaps your setting is different for some other reason, or perhaps it also depends on group policy or other settings.

Re: Feature request in Installer.ahk

Posted: 27 May 2020, 06:00
by malcev
You are right, I think that I manually turned off UAC.
"Run as administrator" and "Run with UI Access" does nothing for me with EnableLUA = 0.
I need "Run with UI Access" only with that undocumented function.
But may be there are some others functions that need to be called with UI Access?