I have configured my .NET application using an application manifest to request administrator privileges. I have also signed the assembly using signtool. Everything works great—when you start the application, you get the nice UAC prompt with the application's name and the name of the signing certificate.
However, when I run the application from a network share, the elevation prompt displays the generic executable icon, not my application's icon. How do I make the UAC prompt display my application's icon instead?
I probably found out.
UAC runs on top of a service, the dialog we see is on top of the desktop snapshot. The service would just display the dialog box as if it were on the desktop.
As we know services run on SYSTEM account (among few others). This means it needs SYSTEM to have rights on the executable we are launching. I assigned security to myself only exclusively (stripped out SYSTEM).
As soon as I gave rights to SYSTEM (read rights only!), and launched the application - it showed the application icon!