Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have recently written a C++ application which does things that I would consider "risky" for Microsoft's standards (like system(), CreateProcess(), etc), and it turns out that it doesn't trigger UAC warnings. I also remember writing silly C# applications which did trigger UACs.

So my question is: What, specifically, triggers UAC warnings? Does it have something to do with the compiler? (I'm using MinGW via DevC++)

share|improve this question
    
Some more info required, perhaps some sample code? CreateProcess for example would not be risky as long as its not run by an Admin most likely. –  AthomSfere May 14 '13 at 17:00
    
Nothing much, just a bunch of system() and some PSAPI stuff. My point, actually, is to know what could trigger it and not some specific example. –  esauvisky May 14 '13 at 17:05
1  
I believe anything that required elevated permissions. So you can run system commands and CreateProcess() all you want for things that don't require elevation, but anything that would trigger UAC would trigger UAC, i.e. if your system command tried to run the "add or remove user accounts" –  ernie May 14 '13 at 17:23
1  
It's typically when commands like CreateProcess() tries to modify system settings or make changes to the registry outside of the user hive. If the process essentially tries to "extend beyond it's reach". –  Moses May 14 '13 at 17:49

1 Answer 1

up vote 2 down vote accepted

Short answer: Actions which require Administrator privileges will trigger the UAC.

Wikipedia provides an outline list:

User Account Control - Tasks that trigger a UAC prompt.

  • Running an Application as an Administrator
  • Changes to system-wide settings or to files in %SystemRoot% or %ProgramFiles%
  • Installing and uninstalling applications
  • Installing device drivers
  • Installing ActiveX controls
  • Changing settings for Windows Firewall
  • Changing UAC settings
  • Configuring Windows Update
  • Adding or removing user accounts
  • Changing a user’s account type
  • Configuring Parental Controls
  • Running Task Scheduler
  • Restoring backed-up system files
  • Viewing or changing another user’s folders and files
  • Running Disk Defragmenter
share|improve this answer
    
Oops, I had forgot to check Wikipedia before. What really solved it was reading that Windows 7 has a "more relaxed" UAC version than Vista, which was the current version when I developed my older C# applications. –  esauvisky May 14 '13 at 18:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.