Solved

How to detect UAC

Posted on 2009-04-05
6
936 Views
Last Modified: 2012-08-13
How can I detect if UAC is enabled or disabled?
0
Comment
Question by:DSOM
6 Comments
 
LVL 11

Expert Comment

by:xtreminator
ID: 24071954
comman methode to detect UAC in vista is creating new notepad file and write some text and save this file in root drive

eg.

go to c: drive
create new notepad file and write something (dummy) entries and try to save in C: drive, when error prompted like cant save or cant make file that means UAC is enabled.

and every time u prompting when u settings in system (system protection prompt, OS need to answer it)
0
 

Author Comment

by:DSOM
ID: 24072300
Thanks but my program is elevated so I would be able to create that file without error.  I am looking for an API or some other programming means.
0
 
LVL 1

Expert Comment

by:stOrM
ID: 24072610
Hi,
you could use JWSCL for this in the JWSCLToken.pas unit you'll find function JwIsUACEnabled: Boolean;

The JWSCL Api can be downloaded here http://blog.delphi-jedi.net/home/

regards
stOrM!
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:DSOM
ID: 24072710
Unfortunately that function does not appear in that unit (anymore) :/
0
 
LVL 1

Expert Comment

by:stOrM
ID: 24073650
Huh? Maybe you have an outdated version? Maybe you should update via svn in mine there is the function inside!

regards
s!
0
 
LVL 26

Accepted Solution

by:
EddieShipman earned 500 total points
ID: 24081348
You can also check this registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA

0=Disabled
1=Enabled
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 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