View Single Post
Old 24th November 2015, 10:41   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,321
Quote:
Originally Posted by LoRd_MuldeR View Post

I think if UAC is turned off, then ShellExecute(Ex) just launches the "elevated" process without showing the UAC dialog. In this special situation Exec or ExecWait could do the job too, but they'd start failing as soon as UAC is actually not turned off on some computer. ShellExecute(Ex), on the other hand, works fine under both conditions, I believe.
Why do you think I called it an issue? When you turn UAC off on these systems, ShellExecute with the runas verb just starts the process unelevated! The UAC plug-in detects this and displays its own RunAs dialog to handle this case. In other words, when you turn off UAC then NT6 acts like NT5 except that the runas verb is broken...

Quote:
Originally Posted by LoRd_MuldeR View Post
Since these "legacy" systems didn't have UAC, they just ignore the "elevation" request from the Manifest.

If a "non-admin" user launches your installer on any of these systems (or an "admin" user uses run as to run your installer under a "non-admin" account), you have a problem anyway! The installer needs to detect this via UserInfo plug-in and abort...
Sure but that is not what we are talking about here. You implied that ExecShell[Wait] is a simple drop in solution to start something elevated and it is not. What we need is a plug-in that does this properly but that is not really relevant if the OP wants to continue using the UAC plug-in...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote