Published on by

I hope the author of the original article will forgive me for borrowing a part of his text with some editing on my side.

Have you right-clicked on a shortcut only to find out that the Target text box is locked, disabled and grayed out?

Have you ever wanted to change the icon of a shortcut just to find that the Change Icon button for that shortcut is disabled?

Have you tried to use Run As... Administrator, and you cannot find it in the context menu, and the checkbox located under the Advanced Properties cannot be checked?

Then you have probably also wondered why is it that when you drag a file, and drop it on a certain shortcut your action does not launch the program.

If you answered "Yes" to some or all of the above questions than you have came to the right place.

That phenomenon is a "feature" of MSI a.k.a. Windows Installer called Advertised Shortcuts.

Advertised shortcuts ensure that the shortcuts always have an icon, even if users move from machine to machine. The advertised shortcuts also trigger the installation of an application missing on the machine where the user is currently active.

The reason for this article is that I was annoyed by the second part of the behavior mentioned above — I hate it when I remove some component of an application which I deem useless only to be presented with a Windows Installer trying to "repair" the installation when I right-click on any object in Windows Explorer few seconds later. When I delete something I want it to stay gone!

The author of the original article mentions several ways to deal with this problem, but I wanted a simpler solution. That is why I wrote a small console application called noadvtsh.exe which you can get from my website Downloads section.

It is very easy to use as it has only one parameter — the path to the .MSI file you want to add the DISABLEADVTSHORTCUTS property into. Keep in mind that you have to do that before installing the product though. There is probably a way to programmatically modify already installed products as well, and I will look into it when I have more time so stay tuned.