|
||||||
| General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
I have a console app that (in certain situations) does not work correctly when UAC is enabled. As such, I'd like to print out a warning (and, if possible, trigger an UAC authorization screen) if UAC is detected as activated. What is the code to do so?
If possible, I'd prefer code in C or C++ for the following functions: Code:
/* returns 1 if UAC is enabled, 0 if disabled or the OS is a non-Vista one */ int isUACEnabled() /* triggers an UAC authorization dialogue, granting full access for the rest of the program's operation. Returns success or failure. */ int AskUAC() I tried to search for UAC and "User Account Control", but the first search is disabled and the second didn't return anything relevant. Many thanks for any answer. |
| Sponsored Links |
|
|
|
|||
|
You need to use the registry to check and see if UAC is enabled. The value is 'EnableLUA' under 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Po licies\System'
If its a '1' then its enabled, else its disabled. If the value doesn't exist, its not running vista.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HOw to Master C/C++?How to achieve that ?! | Master | C and C++ | 11 | 06-21-2007 04:45 PM |
| where are files created by VIM located? | mysticalone | Computer Software/OS | 6 | 01-25-2007 08:35 AM |
| Active Desktop | mysticalone | Computer Software/OS | 5 | 01-04-2007 08:53 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |
Goal: 100,000 Posts
Complete: 98%