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

Possible to have auto uninstall/install MSI installer (with the same product GUID)?

I have been using InstallShield for many years. I've always managed to create an installer that will either automatically uninstall everything then install the new (ideally) or just install on top (ok but not ideal). Most of those installs were InstallScript based.

I'm trying to do an MSI InstallScript install (with minimal InstallScript, none if possible). I see too many companies REQUIRING MSI based installs. So I chose MSI InstallScript just in case I have to do some installscript but prefer do none. I know how to do this in InstallScript.

For inhouse development I don't want to have to change ANYTHING in installshield per build (which is completely automated under cruise control). Just Build It with latest EXE's and DLL's package it up in a setup.exe and let users install. It's a pain to have to Manually uninstall it for every build. I want it to automatically uninstall and proceed to the install when the user runs setup.exe (with no extra dialogs ideally).

Right now if the user runs the setup.exe they get a Modify, Repair, Uninstall dialog. I don't want that. I want it to automatically uninstall and then proceed to install with all the SAME product GUIDs.

When I truely do a release the rules will change and I will update Product GUID etc. as needed.

Under General Information I've tried Maintenance Mode On and Off (that looks like it runs optionally runs InstallScript Code). That's what so confusing it's so freaken hard to know what is MSI and what is InstallScript.

Under Upgrades I have Minor Set to Don't Prompt, Just Install
And under Major I have Uninstall and then Reinstall (I don't think this matters because I have not triggered a Major upgrade with new GUIDs).

So how can I force a simple quick quiet UPGRADE without new product GUIDs (or Minor added components) in an MSI based install?

By the way I think I had this working in IS12 but it refused to overwrite .Net assemblies with the same version. So I put it on hold until we automated that. Now with 2008 I can't even get that far. But I prefer it not overwrite but fully uninstall and reinstall.
Labels (1)
0 Kudos
(3) Replies
mswlogo
Level 3

Guess I was too wordy.

Can I have an MSI install that automatically will uninstall first using the same product GUIDs?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

There's no great way to do this. If you need this on your development machine, launching the install from the IDE will, by default, uninstall the previous one. But outside the IDE, or on another machine, that's no help. If your product code stays constant long enough, you could add a batch file to your DISK1 folder which could be something like (with substitutions made):
setup.exe /x
setup.exe
or
msiexec /qn /x ProductCode
msiexec /i Product.msi
and just train yourself and others to click the batch file instead of setup.exe / product.msi

As an aside, if your goal is to be an MSI with the option of later leveraging some custom script code if you need it, I would strongly suggest a Basic MSI project (with optional later InstallScript custom actions) over an InstallScript MSI. An InstallScript MSI, unlike a Basic MSI, depends on setup.exe and thus can fail in certain scenarios that accept Basic MSIs.
0 Kudos
mswlogo
Level 3

MichaelU wrote:
There's no great way to do this. If you need this on your development machine, launching the install from the IDE will, by default, uninstall the previous one. But outside the IDE, or on another machine, that's no help. If your product code stays constant long enough, you could add a batch file to your DISK1 folder which could be something like (with substitutions made):
setup.exe /x
setup.exe
or
msiexec /qn /x ProductCode
msiexec /i Product.msi
and just train yourself and others to click the batch file instead of setup.exe / product.msi

As an aside, if your goal is to be an MSI with the option of later leveraging some custom script code if you need it, I would strongly suggest a Basic MSI project (with optional later InstallScript custom actions) over an InstallScript MSI. An InstallScript MSI, unlike a Basic MSI, depends on setup.exe and thus can fail in certain scenarios that accept Basic MSIs.


I was starting to think along those lines as well. Is there anyway to set a default set of switches as resource within the install itself?

I guess you can't because i just noticed your little script has to be two steps.

I just switched to XML format project file and might tickle the GUID on every internal build. And basically treat every build as a major upgrade.

I know in IS12 I did have it manage to do a straight "overwrite everything" install. But I can't get it to do it in IS 2008.

Also thanks for your comments regarding Basic MSI vs InstallScript MSI.
0 Kudos