Installer automatically re-creates deleted shortcuts

Carl Olsen's picture

I have my installer setup where it creates many shortcuts for the product in various places, and then one of my custom extensions deletes shortcuts that are not relavent for the particular setup. 

(It's a little hard to explain why I do things this way, but that's the way I do it - but basically my software is branded under two different manufactuers with different logos, icons, and company names, but I want to use the same installer to make both installs.)

Everything works great and when the software is finished installing, all the shortcuts that should be there are there, and those that should not are not.

Unfortunately, after the computer reboots and the user logs in, everytyhing looks fine for about 3 or 4 minutes, then all of a sudden the deleted shortcuts pop back into existance.

Any idea how to prevent deleted shortcuts from repairing themselves?

= = = = =

Or an alternate approach, is that I could only create shortcuts that are relavent to the particular install that I am doing in the first place.  Unfortunately, I dont' know how to say "If SomeFlagIsSet then Create Shortcut set #1, else Create Shortcut Set #2".  Any idea how to do this?

Thanks,

Carl.

AngelD's picture

I'm guessing you're having

I'm guessing you're having these shourtcuts as advertised or some other entrypoing triggering the repair.
Check the eventviewer for which component that is found broken, also which entrypoint that triggered the self-check in the first place.

Why not add the shortcuts through a custom action (condition as during install) instead so they don't get repaired. You will also need to author a custom action to delete these during uninstall.

Gustavo Bignozzi's picture

In order to maintain your

In order to maintain your current workflow I think you could turn off advertising.
Otherwise you could also add the shortcuts to a hidden sub-feature (level 4), and make a Custom Action to install locally one or the other sub-feature depending on your condition.
==
As AngelD said, the alternate approach could be adding as CA call script/dll from installation, having the script/dll add the shortcuts #1 or #2 depending on a Property value, but that would require coding.

EdT's picture

Do you need advertised shortcuts?

If your application does not require advertised shortcuts (ie no requirement for self healing on application startup for user regkeys, etc), then you could change your application to generate the shortcuts using VBScript custom actions, and appropriate conditions, so that only the required shortcuts are created for the chosen configuration. This avoids the self healing problem you are currently experiencing.

Also, placing each EXE file which has a shortcut associated with it, into a separate feature, will also reduce or remove the problem. This is the default beahviour of Wise when you do an application capture - each exe and its shortcut is put in a separate feature. Since self -healing occurs at a feature level, having only a single EXE file which is also the key path of the single component in the feature, will mean that repair is only going to happen if the EXE is deleted.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.