Posts: 3
Joined: Wed Apr 24, 2024 11:56 am

Desktop Shortcut Disappears After Replacing Program: Seeking Solution

I'm encountering an issue when replacing an installed program with a new one. Here's the scenario:

1. The original program places a shortcut on the desktop named "shortcut.lnk".
2. I've developed a new program that also places a shortcut named "shortcut.lnk" on the desktop, effectively replacing the old one.
3. The new program is designed to completely remove the old program upon installation.

However, upon uninstalling the old program, the desktop shortcut "shortcut.lnk" disappears along with it. This behavior is undesirable as it disrupts the user experience.

I'm seeking suggestions on how to ensure that the desktop shortcut remains intact when uninstalling the old program. Is there a way to accomplish this while still removing the old program completely?

Any insights or guidance on resolving this issue would be greatly appreciated. Thank you for your assistance!
Posts: 6773
Joined: Wed Jun 13, 2018 7:49 am

Re: Desktop Shortcut Disappears After Replacing Program: Seeking Solution


Not removing the shortcut would imply not removing the entire shortcut's component - which most likely contains the EXE as well.

The upgrade works like this:

- the older version is uninstalled - this is when the shortcut is removed

- the newer version is installed - this is when the newer shortcut should be created

How do I prevent a file or registry entry from being uninstalled or repaired?

(method 2)

The above, however, may cause some problems with the upgrade in the sense that your newer version of the EXE might not be able to overwrite the older one.

Best regards,
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”