UMMM icon indicating copy to clipboard operation
UMMM copied to clipboard

Is the default value for uiAccess = True?

Open DavidHollman opened this issue 5 years ago • 4 comments

The comment in the sample INI file (https://github.com/wqweto/UMMM/blob/master/Sample.ini) says:

#     uiaccess       (optional) true/false or 0/1. Allows application to gain access to 
#                    the protected system UI. Default is 0

If the default is 0 then that means uiAccess = true? But that would seem to be a surprising default... according to https://docs.microsoft.com/en-us/previous-versions/bb756929(v=msdn.10)?redirectedfrom=MSDN True means:

True | The application is allowed to bypass user interface control levels to drive input to higher privilege windows on the desktop. This setting should only be used for user interface Assistive Technology applications.

and then it goes on to add:

Important Applications with the uiAccess flag set to true must be Authenticode signed to start properly. In addition, the application must reside in a protected location in the file system. \Program Files\ and \windows\system32\ are currently the two allowable protected locations.

Is this really the default? Or is it actually false?

DavidHollman avatar Nov 27 '19 19:11 DavidHollman

Duh, not hard to check this myself.

In mdUmmm.bas around line 203 it has:

                '---   uiaccess is true/false or 0/1
                pvDumpTrustInfo C_Lng(At(vRow, 1, "1")), C_Bool(At(vRow, 2)), cOutput

(note the 3rd arg to At())

Therefore the default is 1 = false.

DavidHollman avatar Nov 27 '19 19:11 DavidHollman

Private Function pvDumpTrustInfo(ByVal lLevel As Long, ByVal bUiAccess As Boolean, cOutput As Collection) As Boolean

Notice that first At provides the trust level which defaults to "1" while second At enables/disables UI access and defaults to empy string (which C_Bool converts to false).

When the bUiAccess parameter is false then the uiAccess attributes is not set at all in the result manifest XML: IIf(bUiAccess, " uiAccess=""true""", vbNullString)

wqweto avatar Nov 27 '19 20:11 wqweto

Oh yes, you're right of course, I was looking at the wrong At(). Thanks for the correction.

I think I will leave the 0 / false setting in my INI file in any event, since that is more clearly self-documenting.

DavidHollman avatar Nov 27 '19 20:11 DavidHollman

I just added https://github.com/wqweto/UMMM/pull/27 which I think addresses the documentation of the uiaccess default value. I think I've got it right... please let me know otherwise.

DavidHollman avatar Aug 12 '20 14:08 DavidHollman