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

Question about Major upgrades changed from Installscript to MSI

Ok heres the problem,,

Installscript package created with installshield 12 (exe)

Now using installshield 2008 with a basic msi pckage for the new version (msi)

but i cannot work out how to get the older version uninstalled before the new one installs

Have tried minor and major upgrades but it does not detect the older version

(please note my knoledge of installshield is very limited so this may be a simple solution but i just dont know enough about the program to work it out)
Labels (1)
0 Kudos
(8) Replies
Not applicable

MSI based projects can only upgrade other MSI based projects. So basically, it's not possible to upgrade an InstallScript project using a Basic MSI project.
0 Kudos
jcisthebest2000
Level 3

bryanwolf wrote:
MSI based projects can only upgrade other MSI based projects. So basically, it's not possible to upgrade an InstallScript project using a Basic MSI project.



Thanks for the reply bryanwolf

In that case is it possible to uninstall the older version before the new msi install completes otherwise i have the problem of having two of the same programs installed

Or if not is it possible for installshield to delete all the shortcuts of the old program before it installs the new one?
0 Kudos
alegerlotz
Level 7

bryanwolf wrote:
MSI based projects can only upgrade other MSI based projects. So basically, it's not possible to upgrade an InstallScript project using a Basic MSI project.


You should be able to help your customers out by detecting the exiting product through a SystemSearch and Install Condition to display a message asking them to uninstall the old version prior to installing the new one.

You could also try doing a custom action in your .msi to detect the existing version and then do a "LaunchAppAndWait" to the uninstall the existing product by issuing the uninstall command for that product.

Good Luck,
-Al
0 Kudos
jcisthebest2000
Level 3

alegerlotz wrote:
You should be able to help your customers out by detecting the exiting product through a SystemSearch and Install Condition to display a message asking them to uninstall the old version prior to installing the new one.

You could also try doing a custom action in your .msi to detect the existing version and then do a "LaunchAppAndWait" to the uninstall the existing product by issuing the uninstall command for that product.

Good Luck,
-Al


Now that sounds like a plan, Ive done the install condition to tell them to uninstall all old products first but to be honest that will be a lot of hassell for the end user. I really need to do it for them in the install.

The custom action sounds good (if i knew how to do it haha)

could you give me step by step instructions because i am an absolute beginner when it comes to installshield and scripts. If anyone could that would be GREAT

Thanks in advance
0 Kudos
alegerlotz
Level 7

The quickest thing to do would probably be to do an InstallScript custom action.

The custom action would want to do the following:

1. Detect your existing product

If found, continue

2. Alert your user to what you're doing (removing the old product before continuing).

3. Read the "UninstallString" from HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\

4. Do a "LaunchAppAndWait" using the uninstall string from step 3, along with switches to make it silent for the user

Continue with the install of your new product.


Hopefully your old product does not require a reboot at uninstall time, or this will complicate things quite a bit (since it will want to reboot at uninstall time). If I remember you can supply a command line switch to supress the reboot. Its been a while since I've had to do this.

That should be enough to get you going. 😉
0 Kudos
jcisthebest2000
Level 3

alegerlotz wrote:
The quickest thing to do would probably be to do an InstallScript custom action.

The custom action would want to do the following:

1. Detect your existing product

If found, continue

2. Alert your user to what you're doing (removing the old product before continuing).

3. Read the "UninstallString" from HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\

4. Do a "LaunchAppAndWait" using the uninstall string from step 3, along with switches to make it silent for the user

Continue with the install of your new product.


Hopefully your old product does not require a reboot at uninstall time, or this will complicate things quite a bit (since it will want to reboot at uninstall time). If I remember you can supply a command line switch to supress the reboot. Its been a while since I've had to do this.

That should be enough to get you going. 😉


I know you are probably going to think im a muppet but i get all that bit and understand what its trying to do but im not too sure how to actually do it. I think i get the first 2 maybe 3 steps but the last.. Do a "LaunchAppAndWait" using the uninstall string from step 3, along with switches to make it silent for the user how do i do a LaunchAppAndWait 😛

Sorry if i sound stupid but i am a beginner
0 Kudos
alegerlotz
Level 7

jcisthebest2000 wrote:
I know you are probably going to think im a muppet but i get all that bit and understand what its trying to do but im not too sure how to actually do it. I think i get the first 2 maybe 3 steps but the last.. Do a "LaunchAppAndWait" using the uninstall string from step 3, along with switches to make it silent for the user how do i do a LaunchAppAndWait 😛

Sorry if i sound stupid but i am a beginner


We've all been beginners. The question is whether you keep at it and figure out how make the tool do what you want it to.

LaunchAppAndWait is an InstallScript call that is used to call another executable program on a machine. Think of it like a batch file that calls an .exe or command. The "Wait", as it implies, means that the call out to the other program will wait until the program completes before continuing. I believe that for an uninstall, you should be fine using that, and the wait will work and your code will continue after the unisntall of the old product is complete. There are some nuances when you're calling a .exe that in turn calls another exe because the "Wait" doesn't always happen properly in those cases. Don't worry about that now, though.

For InstallShield 2008 they changed the command, actually, so there is "LaunchApp" and another variation that I haven't used. I'm pretty sure that LaunchAppAndWait is still available for backward compatibility anyway.


Step 2 is a message box or dialog box, depending on whether you want to give the user the ability to cancel from what they're doing. That's pretty straight forward

Step 3 is calls to the Registry read functions in installScript, and potentially some string manipulation on the uninstall string you get back to separate the exe to call from the command line (hint: the stuff to the left of the first space in the string is the .exe to call and the rest is the command line 😉 ).

Step 4 involves using the LaunchAppAndWait function (or the 2008 equivalent) with the exe name and command line, as well as command line switches to get that uninstall to go silently. To figure out what these switches are for the silent part, you're going to have to play around uninstalling your old program using command line switches for whatever exe is in the uninstall command. You'll have to do some research/google searches to find out more about what the command line switches are.

My advice is to get step 4 working properly by issuing a command line in a dos/cmd box first, THEN try to program it in install script. Not only will this be quicker, it will be less frustrating.

Given that you're new to this, its probably going to take you a couple of days, so anticipate this. If you haven't done any of this before, its not a one or two hour task.

If you have to get it done yesterday, make your customers uninstall first manually.

-Al
0 Kudos
jcisthebest2000
Level 3

Just to give you an update i have currently rolled out the update to the clients with the option to manually uninstall the old application. I will research the other option in more depth before i try to roll that one out.. Thanksvery much for your help though

Much Appreciated!
0 Kudos