Page 1 of 1

Shortcuts not removed when removing a feature in Maintenance

Posted: Thu Jun 10, 2010 8:11 pm
by amvbsd
Hi,

I was testing yesterday a setup project, and realized that for some reason, shortcuts are not removed when I deselect a feature in Maintenance mode. For example, I install Features A, B and C and each feature creates a shortcut. I then go into Maintenance mode, remove Feature A. The files for Feature A are removed, but the shortcut remains. If I double click the shortcut, it tells me that the file was not found (in XP32) or it tries to open some Axxxxxx.rbf file (XP64). I thought it was because I was testing a heavily customized setup. However, I then tried another setup that has very few changes from the default project and only two features, and the problem is also present. The strange thing is that if I uninstall the application, everything gets removed correctly. For example, if I install Features A, B and C and then uninstall, everything gets removed. If I install all features, then remove Feature A (the shortcut is not removed) and then uninstall, the shortcut is left behind. If I install all features, remove Feature A, then add again Feature A and finally uninstall everything, the shortcuts are all removed correctly.

Has someone seen this behavior before? Any suggestions on what to look for? I'm building the setups in a WinXP 64 VM and testing in WinXP 64 (VM) and WinXP 32 (Physical), and have the same problem in both plataforms. Using IA9 (Build Moya.SP1.070409).

Thanks in advance.

Arturo.

Re: Shortcuts not removed when removing a feature in Mainten

Posted: Fri Jun 11, 2010 5:34 am
by MichaelNesmith
I think you should be able to easily solve this problem in the MSIcode editor. Make sure the Create Shortcut commands are placed inside the correct feature If...End blocks that install your features in question.

Re: Shortcuts not removed when removing a feature in Mainten

Posted: Fri Jun 11, 2010 8:30 am
by amvbsd
Hi, Michael,

That is exactly what's strange. They are placed in the right If...End blocks, along with the files they point to. If I only install Feature A, only the shortcut for Feature A is installed. If I remove Feature A, only the shortcut for this feature exhibits the behavior described. Here is a sample code for one of the features in one of the installers with this problem:

Code: Select all

  [DEFINE WEB MEDIA Administration Module]
  Get Component Finanza Pro 3\Administration Module Selection State into Variable SELECTED
  if Variable SELECTED Equals TRUE
    Install Files M:\Commercial Products\Finanza Pro\build\bin\releases\3.7\nexusdb\licenses\SFPAdminNexusDB.LIC to $TARGETDIR$ (Never Overwrite)
    Install Files M:\Commercial Products\Finanza Pro\build\bin\releases\3.7\nexusdb\clients\SFPAdminNexusDB.EN to $TARGETDIR$
    Install Files M:\Commercial Products\Finanza Pro\build\bin\releases\3.7\nexusdb\clients\SFPAdminNexusDB.ES to $TARGETDIR$
    Install Files M:\Commercial Products\Finanza Pro\build\bin\releases\3.7\nexusdb\clients\SFPAdminNexusDB.exe to $TARGETDIR$
    Create Shortcut $SHORTCUTFOLDER$\Finanza Pro Administration to $TARGETDIR$\SFPAdminNexusDB.exe
    if Variable DESKTOPSHORTCUTS Equals TRUE
      Create Shortcut $DESKTOPSHORTCUTFOLDER$\Finanza Pro 3 Administration to $TARGETDIR$\SFPAdminNexusDB.exe
    end
  end
In this installer, BOTH shortcuts are left behind when I remove this feature: the one in the Start Menu and the one in the Desktop. And this happens with all features in both installers I've tested.

Any suggestions on what to look for?

Thanks.

Arturo.

Re: Shortcuts not removed when removing a feature in Mainten

Posted: Fri Jun 11, 2010 4:02 pm
by MichaelNesmith
Not really! That seems very odd to say the least.

Can you reproduce this issue with a minimal project that doesn't need any of your files so R&D can take a look at it?

Re: Shortcuts not removed when removing a feature in Mainten

Posted: Fri Jun 11, 2010 6:34 pm
by amvbsd
Hi, Michael,

I've created a sample project and sent the link to download it to the support email. I also found the culprit in the process, but still can't find a solution to the problem. The project is localized, and when it is run in Spanish, the problem appears. When it is run in English, the shortcuts are removed normally when a feature is removed. Perhaps I'm localizing something I shouldn't? I've included all localization files in the sample project as well.

Thanks in advance!

Arturo.