Can orphaned user pinned Windows 7 taskbar shortcuts be cleared programmatically?

212 views Asked by At

Here is the scenario:

In the Wix install script for our application , start menu shortcuts and desktop shortcuts are now handled differently than before.

These changes causes any user pinned shortcut to the application on the taskbar to be orphaned when a user runs an update from a previous installation. In other words, the shortcut remains but is no longer pointing to anything.

The shortcut is shown as a blank page indicating that the link has been removed. A quick peek at the C:\Users[UserName]\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar folder confirms this. Clicking on the shortcut will remove it and then show a windows dialog asking whether to remove the shortcut or not (answer has no meaning since it has already been removed).

My question is:

Is there any way to tell the taskbar to remove orphaned shortcuts ?

Preferrably this would be triggered by a custom action in the Wix script after installing the new version.

1

There are 1 answers

0
Christopher Painter On

The roaming profile can move from machine to machine so it's pretty much impossible. About all you could do is leave behind a component that runs on logon and detects that your app is no longer installed and deletes the shortcuts.

I'd consider this user data and let the user worry about it.