How to get the current UAC mode

Can we check what is the current UAC type set in the device before running the application through C#.

I got to know the approach to check whether the current user is Administrator or not. But, I also need to know the UAC type set (i.e. default/never notify) for some internal logic.

Is it possible? Please help.

Answers


This is an article about self-elevation and checking what level your program runs in. However due to security reasons I'm afraid you won't be able to retrieve the UAC level that is set.

http://code.msdn.microsoft.com/windowsdesktop/CSUACSelfElevation-644673d3


Need Your Help

Dynamically Created User Controls In C#

c# .net winforms dynamic-controls

I am working in a C# winforms project and I have a user control which gets loaded upon its selection from a tool-strip menu. I have a dictionary lookup set to occur upon form load of the user contr...