Solved

How to detect UAC

Posted on 2009-04-05
6
945 Views
Last Modified: 2012-08-13
How can I detect if UAC is enabled or disabled?
0
Comment
Question by:DSOM
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: 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

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!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

707 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