cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
darshanj
Level 3

Problem in automatically detecting previous version

Hello All,
I am using InstallShield Premier 2008 and my project type is BasicMSI. I want to detect whether there is an older version of my product installed on the user's machine. If yes, then it should automatically uninstall this version before installing the current version. I have kept the same upgrade code for the previous and the current version of my product but I have changed the product code for my latest version. Now if I try to run my current installer, it does not detect the previous version which is present on my machine (so doesnt uninstall it) and installs the current version. But now if I run my current setup again it recognizes my current installation, uninstalls it before rerunning the setup again. Can anybody tell me what I am missing here?
My old installers are made from the InstallScriptMSI type of project. is this factor causing the problem? I found this link 'http://support.installshield.com/kb/view.asp?articleid=Q112578' and tried out the steps mentioned here but got the same incorrect result.
Thanks for the any help in advance.

Cheers,
Darshan
Labels (1)
0 Kudos
(8) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

How do you detect that the older version has not been uninstalled? The UI experience is different between same-version, and minor and major upgrades - in particular the major upgrade doesn't tend to mention that it's removing the previous version.
0 Kudos
darshanj
Level 3

Hello MichaelU,
Thanks for your prompt reply! Actually the older version is installed in my 'ProgramFiles' folder. I run my current setup and install the product at a different location. After finishing the installation my old product is still there in the 'ProgramFiles' folder.
I am trying the steps mentioned in the following URL:
http://community.installshield.com/showthread.php?p=215476

But this approach also fails to detect the previous product. I am stuck!

Can you tell me whats going on here?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

There are a couple issues at hand here. First, do you have a major upgrade item in place to go look for the previous version? If not, there is nothing aware of any need to check, so MSI does not. Second, since you want to remove an InstallScript MSI from a Basic MSI, you need to manually ensure the InstallScript portion is uninstalled, or you will have a ghost in Add or Remove Programs.

This KB article has better information on performing this process correctly: http://support.installshield.com/kb/view.asp?articleid=Q112578
0 Kudos
darshanj
Level 3

Thank you very much Michael! Anyways now, we are not uninstalling the previous version but are just giving a message saying that a previous version is already installed and exiting the setup. But your help was indeed informational. Thanks again!
0 Kudos
Nicolasb
Level 5

I want a version to remove older version before install. I created a new major upgrade entry wich have the current version number in the Maximum Version Field.

That works.

Now, I want to easily create new update without having to increase the number in the Maximum Version field. I tried using the PRODUCTVERSION property, but it did work. The new version did not remove the earlier version.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Nicholasb: If you use the radio button option to select All Previous Versions, we should be placing a special value in the underlying table (something like ***ALL_VERSIONS***) which is replaced at build time with the current version of your project. If I understand what you're asking for, using this functionality should provide it.
0 Kudos
scottdj
Level 2

darshanj wrote:
Thank you very much Michael! Anyways now, we are not uninstalling the previous version but are just giving a message saying that a previous version is already installed and exiting the setup. But your help was indeed informational. Thanks again!


I just want to determine if any version of the application is installed, and if so, give the user a message telling them to uninstall existing version of app, then rerun the new install package. Since I am a complete newbie I don't know how to to this, can you explain in detail?

THX
Scott
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

scottdj: One option would be to follow the steps for detecting newer versions, but instead of using all versions, manually change the range of the ugprade item to use a lower bound of your lowest released version (say 1.0.0.0). Then you can modify the message to say "another" version instead of "a newer" version.
0 Kudos