Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Getting if UAC is active or not

Posted on 2010-09-14
7
Medium Priority
?
1,070 Views
Last Modified: 2012-05-10
Is there a way (based on API) to find out is User Account Control active or not (Vista/Win7), and if possible at which of 1-3 levels (on Win7)?
0
Comment
Question by:npaun
  • 3
  • 3
7 Comments
 
LVL 42

Expert Comment

by:Meir Rivkin
ID: 33671328
Vista/Win7:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\SystemEnableLUA - 1 --> enabledEnableLUA - 0 --> disabled
0
 
LVL 42

Expert Comment

by:Meir Rivkin
ID: 33671365
to read registry values in vb, check this post:
http://www.experts-exchange.com/Programming/Misc/Q_20795428.html
0
 

Author Comment

by:npaun
ID: 33671366
thanks. Is it possible to find out at which 1 out of 3 levels at Win7 is UAC set?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:npaun
ID: 33671417
thanks, reading is not a problem: I have a class that incorporates all kinds of methods (based on API) for registry access. Anyway, what about UAC levels at Win7?
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 33671853
You don't have to be concerned with whether UAC is enabled or disabled but only determine that your process is running under the appropriate token.
VB6:                http:Q_24999995.html
VB.NET:           http:Q_25140579.html
0
 
LVL 42

Accepted Solution

by:
Meir Rivkin earned 2000 total points
ID: 33671892
registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System

Level #1 To Have UAC Always Notify You:
ConsentPromptBehaviorAdmin - 2
EnableLUA - 1
PromptOnSecureDesktop - 1

Level #2 To Have the Default UAC Notification:
ConsentPromptBehaviorAdmin - 5
EnableLUA - 1
PromptOnSecureDesktop - 1

Level #3 To Have UAC Notify without Dimming Desktop:
ConsentPromptBehaviorAdmin - 5
EnableLUA - 1
PromptOnSecureDesktop - 0

Level #4 To Turn Off UAC Notifications Completely:
ConsentPromptBehaviorAdmin - 5
EnableLUA - 0
PromptOnSecureDesktop - 1

based on this link http://www.sevenforums.com/tutorials/299-user-account-control-uac-change-notification-settings.html
0
 

Author Comment

by:npaun
ID: 33677070
Thanks!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't interesteā€¦
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asseā€¦
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question