Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Windows Installer does not remove previous version

Posted on 2014-01-14
8
Medium Priority
?
735 Views
Last Modified: 2014-01-14
Hi experts
I had a problem with my Windows Installer. It does not remove the previous installed version.

On the 'Properties' of the Installer:
I'd updated the 'Version', and click 'Yes' when prompted to change 'ProductCode'.
I had the 'RemovePreviousVersion' set to 'True'.
I had the 'DetectNewerInstalledVersion' set to 'True'.
I had the 'UpgradeCode' remain unchanged.

Could someone point to me what I am missing?

Thanks in advance.

PS. I am using VS2008.
I didn't have this problem before until I moved everything to a new HD. So something might have missed out from my settings.
0
Comment
Question by:dominicwong
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 39778568
>>and click 'Yes' when prompted to change 'ProductCode'.

I think you should have said no to that - the code should be how a previous version is identified.  Try setting the code to the value you had before and see if that will remove the previous version upon installation.
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 39779231
Please post detailed installation log:

msiexec /l*v c:\installation.log /i <path>\installation.msi

@AndyAinscow, the product code in question applies to this version, not previous version. Previous version is identified by upgrade code, i.e. Installer searches for my upgrade code*; finds product code of the previous version, and then uninstalls product with that found product code.

*) more accurately - for the upgrade code specified in UPGRADE table. There can be several, so it's possible to upgrade several different products. It's also possible to upgrade completely different product, if you know its upgrade code.
0
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 1000 total points
ID: 39779252
> I didn't have this problem before until I moved everything to a new HD

Always try things on clean machine. The best is to have virtual machine with saved snapshot, representing just-installed state, which you can always restore in one click. When you test on machine "contaminated" by previous installations (especially imperfect ones made in the course of development), you never know whether the problem is in the new installation, or in the those previous ones, and all this creates an infinite amount of difficult problems. So you may in fact disregard my prev. comment about the installation log, with the best luck we will only find one of those 1,000 reasons introduced by previous installations. Try on clean v.m., post if you still have a problem.
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 44

Assisted Solution

by:AndyAinscow
AndyAinscow earned 1000 total points
ID: 39779428
Hmmm.
From the help files (for my windows installer):

Product Code

Every Windows Installer installation must have a unique product code, which is used as the principal identification for the application.



I have had this behaviour described here when I did change the product code for an existing app by mistake.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 39779443
Ooops - I've done some more digging.
My memory was wrong, I had changed both product and upgrade codes when things went wrong.

Ignore my last comment.  :-((
0
 

Author Comment

by:dominicwong
ID: 39780693
Thanks AndyAinscow and vadimrapp1.
What happened was my old HD was corrupted so I couldn't easily go back to examine.
I reckon something might be missing in my Installer project as I'd experimented it by building two versions. The newer one doesn't uninstall the older one.
I need to do more digging.
0
 

Author Comment

by:dominicwong
ID: 39780751
I managed to resolve this issue.

There was a static red-colour icon next to the icon file under the Installer project.
The path of this icon file that had pointed to an old location. This icon file was referenced by the 'User's Program Men' under the 'File System (Installer)'.

There wasn't any error when I built the Installer project to produce installer files. I can't understand why an icon file could lead to this issue. But fixing the path of this icon file managed to resolve this issue.
0
 

Author Closing Comment

by:dominicwong
ID: 39780756
Thanks Andy and vadimrapp1 for your prompt responses and help. Much appreciated.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question