views:

146

answers:

1

I created a setup program to deploy my VBNet program using Visual Studio 2008. Inside this setup program I created a shortcut to the "primary output" to be installed on the user desktop.

Now, everything is working correctly. The program is installed under "C:\Program Files" and the shortcut is created on the desktop. Also, when I use this shortcut I am prompted by UAC to autorize running this program as administrator. So far, so good...

But! My desktop icon does not have the UAC shield overlay even if the program is compiled with the manifest stating that it must run as administrator. Also, if I manually create a new shortcut on the desktop to the same executable after the installation, this new shortcut WILL have the shield overlay!

I have tried to reboot and delete the iconCache.db file but it did not work.

So my question is: How can I have my desktop shortcut appear WITH the UAC shield overlay when installed initially.

Thanks!

A: 

Without any more details, my only guess is that you create the shortcut before the target exists so that windows is unable to see the manifest.

Anders
Well, I am using the msi builder that comes with Visual Studio 2008. I think it actually create the program folder (therefore the executable) before creating the shortcut, but I cannot be sure.
Alain Hogue

related questions