views:

196

answers:

2

[EDITED to avoid duplications]

I posted this question and in trying to diagnose what is going on have become curious about the magic UAC that happens in the OS. (especially since it seems different on the two platforms.

Can anyone confirm or refute this?

Our unmanaged c++ program causes the "Do you want to allow the following program to make changes to this computer?" to pop up at program start - even before it gets to our winmain.

It appears that there is some kind of test done by the PE loader/launcher/whatever before our app code runs that decides for itself if it should ask for elevation.

EDIT: For clarity

Is UAC elevation logic different on Win7 and Vista?

+2  A: 

A very similar question got asked a short while ago.

Check your app.manifest, see if it requires elevated permissions. Check 3rd party DLLs to see if they preform actions in DllMain (which happens before your app code) that require elevations.

Daniel Goldberg
I believe you are probably talking about the question I linked to - which is also mine. This question is NOT about how to solve it - it is about IF there is a difference in the OSes (based on our testing the answer appears to be 'yes', but that is very confusing)
Tim
There are differences but they're extremely minor (mostly related to the auto-elevation logic which prevents a number of prompts). One user-visible difference is that applications that have been marked as requiring the Windows XP appcompat layer will now require elevation.
Larry Osterman
@LarryThat might be the issue. Thanks
Tim
A: 

Larry Osterman in the comment for another answer provides the answer.

There are differences but they're extremely minor (mostly related to the auto-elevation logic which prevents a number of prompts). One user-visible difference is that applications that have been marked as requiring the Windows XP appcompat layer will now require elevation. – Larry Osterman 2 days ago

Tim