Solved

Getting if UAC is active or not

Posted on 2010-09-14
7
953 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:sedgwick
ID: 33671328
Vista/Win7:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\SystemEnableLUA - 1 --> enabledEnableLUA - 0 --> disabled
0
 
LVL 42

Expert Comment

by:sedgwick
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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:
sedgwick earned 500 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now