Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove Security Shield Symbol on Desktop Icon

Tags:

uac

wpf

c#-4.0

I have developed a WPF application in C# 4.0. This application is installing some other applications (MSI). Due to this I have made below change in application manifest file.

<requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />

After making above changes, Desktop shortcut to the application (app.exe) showing shield symbol with it.

Is there any way to remove this shield symbol from application & desktop short-cut?

I have seen some MSI & Setup.exe, they also install the program on computer but shield icon does not appear with their short-cut icon.

like image 523
Vipul Avatar asked Jul 09 '26 11:07

Vipul


2 Answers

That shield icon exists because of the manifest changes you have made. The way to prevent that is to remove those changes.

I am not sure you need to set that manifest to run an MSI; I believe that running the MSI will itself prompt for elevated privs, so your application should not need elevated privileges itself.

Alternatively, you could have the code that runs the MSI itself demand the admin privs, rather than having the whole application require it, which is what the manifest info does.

like image 195
Andrew Barber Avatar answered Jul 12 '26 01:07

Andrew Barber


No. The shield indicates that if a user launches the exe, they should expect a UAC dialog. You are asking for that in your manifest. It's all working as designed.

like image 32
Kate Gregory Avatar answered Jul 12 '26 00:07

Kate Gregory



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!