Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Deleting Old ShortCut during Upgrade


5 replies to this topic

sarfu

sarfu
  • Full Members
  • 44 posts

Posted 03 May 2007 - 11:54

Hi all,
We have our application with the customer which is a basic msi setup.exe

Now there is a need to change the Shortcut structure from
StartMenu->PhoneApplications to StartMenu->ProgramsMenu->PhoneApplications

Having the new shortcut is not a problem but how to remove the previously installed shortcuts which are installed by previous version?

I went through the documentation. There was reference to RemoveFiles table with filekey, component, ... and InstallMode column. During Upgradation with REINSTALLMODE=vamus REINSTALL=ALL command i changed the InstallMode column value form "2" to "1" i.e. to say this file should be removed during installation. (as value "2" indicates to be removed during Un-installation, "1" means remove during installation( in my case upgradation))

but for me the upgradation din't removed the shorcuts instead it placed the new shortcuts along with the older shortcuts. I can think of some vb script to remove it with CA but i dont want to use any scripts for removal of shortcuts, rather to be done in proper manner (may be with RemoveFiles table or any installer Api).

Can some body please tell me is there a way to remove a shorcut which is previously installed by a previous version, when installting a higher version of the same product? ( Upgrade from Lower to Higher version without un-installation) unsure.gif
Thanks in advance
Sarfu




antyagi

antyagi
  • Full Members
  • 121 posts

Posted 03 May 2007 - 12:40

You should set reevaluate condition to true for this component.
  ankur tyagi

sarfu

sarfu
  • Full Members
  • 44 posts

Posted 03 May 2007 - 14:45

Thanks for your kind reply
sorry to say even if i select true for "reevaluate" condition for the component, the shortcut is not being removed.

Since i am removing the older shortcut i have removed the older shortcut from component and put the new shortcut. Once i remove the older shortcut folder entries, corresponding entries in the removefiles tables will also be removed. Hence i again manually entered the older keyfilename and other details in the removefiles table as it was earlier, with InstallMode=1, but still its not removing the older shortcut when i upgrade the application.

I guess i am missing some entry in the table or missing some condition. Please let me know what might be the reason that the upgrade is not removing the older shortcuts.

thanks
sarfu

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 03 May 2007 - 16:44

Do you specify the path and file name to the .lnk file in your RemoveFile table entry?

Is existing the shortcut in Start menu displayed above or below the horizontal rule or line (or whatever it may be called)? The shortcuts below this separator is a list of recently used shortcuts, so there are no .lnk files but I think some MRU registry entry.

For shortcuts above the separator where often programs like Internet Explorer, Outlook and the like are placed) I'm not sure if they are real shortcuts or also just registry entries, and in which folder they are stored.

So the question is: how did you install the old shortcut in the first place?

antyagi

antyagi
  • Full Members
  • 121 posts

Posted 05 May 2007 - 20:15

QUOTE (Stefan Krueger @ 2007-05-03 16:44)
Do you specify the path and file name to the .lnk file in your RemoveFile table entry?

This is the most common error. You have to specify MyShortcut.lnk in file name.

Also the Directory should evaluate to what you want to remove.
  ankur tyagi

sarfu

sarfu
  • Full Members
  • 44 posts

Posted 07 May 2007 - 14:30

Thanks AntYagi and Stephan,

The problem was with the directory name, it was not pointing to proper directory. Now i am able to remove the older shorcuts while upgrading.

this forum is great

Thanks and regards
Sarfu