When running as a standard user with UAC disabled, choosing “Run as administrator” from the context menu is broken!
Not showing the consent UI is understandable since UAC is not “hooked” into the system, but just starting the process non-elevated without a warning dialog is just wrong. When the runas verb is used with ShellExecute and UAC is not enabled it should just show the old Run As dialog used in Windows 2000/XP/2003.
Advertisement

January 30, 2011 at 15:58 |
Use Sysinternals’ shellrunas as a workaround.
January 31, 2011 at 00:32 |
Windows already comes with runas.exe that does the same job when UAC is off, but that does not help programs/programmers that call ShellExecute and expect the user to be able to specify credentials or elevate. The issue is that this problem is not documented AFAIK so apps have to use ugly version and registry checks and implement their own runas dialog!