Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the default value for uiAccess = True? #22

Open
DaveInCaz opened this issue Nov 27, 2019 · 4 comments
Open

Is the default value for uiAccess = True? #22

DaveInCaz opened this issue Nov 27, 2019 · 4 comments

Comments

@DaveInCaz
Copy link
Contributor

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?

@DaveInCaz
Copy link
Contributor Author

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.

@wqweto
Copy link
Owner

wqweto commented Nov 27, 2019

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)

@DaveInCaz
Copy link
Contributor Author

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.

@DaveInCaz
Copy link
Contributor Author

I just added #27 which I think addresses the documentation of the uiaccess default value. I think I've got it right... please let me know otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants