Solved

Getting if UAC is active or not

Posted on 2010-09-14
7
966 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

808 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