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

Shortcut will not uninstall when program is updated


6 replies to this topic

ankil

ankil
  • Full Members
  • 17 posts

Posted 27 October 2015 - 16:14

Hi. 

 

I have made a Basic MSI installation, everything works great when I install and then uninstall it again. 

But when I upgrade my program from 9.4.1 to 9.5 in a major upgrade, all the folders and the files is uninstalled except the shortcut on the desktop. 

 

I have read some other cases in here, but I can't seem to figure out what the problem is. 

 

This means that when 9.4.1 is install, it gives me a desktop icon which says 9.4.1. 

When i run the 9.5 setup, it deletes all the old files and folders and replaces them with new ones, and it also gives me an desktop icon with 9.5 on it. 

 

But the old Icon with 9.4.1 is still there......

 

Does anybody know how I can fix this?? 

 

I'm using Installshield 2014 professional



deramor

deramor
  • Full Members
  • 187 posts

Posted 27 October 2015 - 16:37

I think this has to do with when your RemoveExistingProducts action is scheduled.  Installshield moves this action around in the sequence depending on the UI selections you make on the Upgrades view.  Personally, I find both options to be flawed and I will explain why.

 

1. Completely uninstall old setup before installing new setup.

This option seems to be the one you are looking for (and likely the one you selected).  The issue here is that Windows Installer is always trying to be efficient and not have to do any file changes if it doesn't have to.  If you review where your RemoveExistingProducts action is in the sequence when this option is selected, it is after File costing.  This is important for a couple reasons.  1. All components are checked to make sure they are required to install.  This includes components with only shortcuts added to them.  In the case of non-versioned files, there are special rules about how they are handled.  These rules may result in the component not getting installed.  2. There is a communication problem between Windows Installer and the .Net framework.  Basically MSi asks .Net if an assembly is present during Costing.  The response is yes and the component is marked as "Do not install". 

 

Both of those actions ignore the fact that the RemoveExistingProducts action will be removing the entire old version before it installs the new one.  Thus everything should be marked as install.

 

2. Install setup then remove unneeded files.

This has all the above problems since the action is scheduled near the end of the install process.

Careful versioning rules must be followed by your development team to get this to work.

I never use it since I don't care about efficiency like Microsoft does.

 

That was the bad.  Now the good.

 

If you select "Completely uninstall old setup before installing new setup" then manually move the RemoveExistingProducts action to after ValidateProductID in the execute sequence, you should get the behavior you are expecting.

 

Why do I do this?

Really the only reason is that it comes before File Costing.  All the same questions and comparisons are made by Windows Installer during Costing but with nothing to compare to, everything gets marked as "To be Installed".

 

The result is, a major upgrade UI sequence runs, it removes the old product, then installs the new version.  I have been using this setting on my products without issue.  Give it a try and see if it helps your situation.



ankil

ankil
  • Full Members
  • 17 posts

Posted 27 October 2015 - 17:50

Thanks for a very fast answer. I'm kinda new at this and I have been so lucky to take over some installastions that someone else made, and this is where the problems begin. 

 

"If you select "Completely uninstall old setup before installing new setup" then manually move the RemoveExistingProducts action to after ValidateProductID in the execute sequence" 

 

probably a stupid question, but could you try and clearify where I can find "Completely uninstall old setup before installing new setup" and "RemoveExistingProducts"?? 

 

Like I said, I'm trying to save a installation that someone else has buildt and I already see multiple problems. 

 

This is just the first of many problems :(



ankil

ankil
  • Full Members
  • 17 posts

Posted 27 October 2015 - 17:57

buy the way, Completely uninstall old setup before installing new setup is on under the major upgrade. 

 

Small/minor upgrade is set to Prompt

 

But where do I manually move the RemoveExistingProducts??



deramor

deramor
  • Full Members
  • 187 posts

Posted 27 October 2015 - 19:24

In the tree view on the left side, you will see Custom Actions and Sequences.

Click there and you will see another tree view displayed in the middle pane.

Under Sequences -> Installation ->  Execute you will find all the actions that will run and in the order they will run during a normal installation.

 

The others are advertisement which is more for installation on demand sort of thing.

 

3rd one is Administrative install which is when someone launches your installer with a -a option.

 

Anyway, under the execute sequence, you will find the RemovePreviousVersion action.  Look closely as they are easy to glance over.

Just drag and drop it where you want it to be. 



ankil

ankil
  • Full Members
  • 17 posts

Posted 04 November 2015 - 12:59

Hi. Thanks for the answer. Sorry for a very late answer, but I've been away with work. 

 

I'm going to test ut you suggestion you wrote in the last message. 

 

But I have one more question for you: When I install 9.5 (the one I told about in my first message) alone, without any other programs installed, and when I uninstall 9.5 again, the desktop icon will not uninstall. 

 

Is that the same problem that you already told me to try or is this a new one? 



deramor

deramor
  • Full Members
  • 187 posts

Posted 05 November 2015 - 17:11

That is something different and may point to what I described as not being helpful for your issue.  Since the process is simpler (only 1 installer involved) can you generate a log and look for the shortcut?  Maybe the log will tell you something.