[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1154
  • Last Modified:

Getting if UAC is active or not

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
npaun
Asked:
npaun
  • 3
  • 3
1 Solution
 
Meir RivkinFull stack Software EngineerCommented:
Vista/Win7:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\SystemEnableLUA - 1 --> enabledEnableLUA - 0 --> disabled
0
 
Meir RivkinFull stack Software EngineerCommented:
to read registry values in vb, check this post:
http://www.experts-exchange.com/Programming/Misc/Q_20795428.html
0
 
npaunAuthor Commented:
thanks. Is it possible to find out at which 1 out of 3 levels at Win7 is UAC set?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
npaunAuthor Commented:
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
 
nffvrxqgrcfqvvcCommented:
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
 
Meir RivkinFull stack Software EngineerCommented:
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
 
npaunAuthor Commented:
Thanks!
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now