Solved

How to detect UAC

Posted on 2009-04-05
6
921 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

863 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

22 Experts available now in Live!

Get 1:1 Help Now