0

Here's my scenario:

I need to have the ability to have different versions of the same product coexist on my machine. So, I need to have a different product key. Cool, no problem. The thing is, I also want to have the option to do a major upgrade ONLY if the user is trying to install to the same location that my product is already installed to.

So basically, I need to be able to launch the "major upgrade" mode AFTER the user selects the location they want to install to.

How might I do this?

Phillip Schmidt
  • 8,805
  • 3
  • 43
  • 67

1 Answers1

1

I know of a way to do what you describe but I'm not sure it's what you want.

What you probably want is multiple instance installers. Take a look at the following article to see if it describes the experience you are looking for:

InstallShield 2009 Beta Part I ( Multiple Instances )

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • We're already using that - but we want to prompt for uninstallation when the user has already selected "new instance". I know, dumb right? But I actually (think) I figured out how to do it. I wrote some managed code to get a product id from its file location, and I'm just gonna use `UninstallApplication()` to uninstall it silently. – Phillip Schmidt Sep 18 '12 at 00:04
  • Take a look at temp tables. You can use custom actions to dynamically emit rows into the Upgrade table to get FindRelatedProducts / RemoveExistingProducts to do the heavy lifting for you and still support rollbacks. – Christopher Painter Sep 18 '12 at 00:20
  • Nice. That's the kind of thing I was looking for. I'm gonna accept your answer right now anyway, but add your last comment to it, cuz that's gonna end up being the route I go with this. – Phillip Schmidt Sep 18 '12 at 14:17
  • I didn't want to give that complicated of a design as an answer at first. Generally if a simpler more commonly used approach will work I go with that instead. I have a customer that does some really wierd stuff along these lines where I'm refletting the machine, building listboxes and then based on business rules dynamically engaging the major upgrade or not. Really wierd stuff and it works well for what they want but personally I think it's over engineered. But hey, the customer is always right – Christopher Painter Sep 18 '12 at 14:57
  • Lol yeah, I'm kind of in the same boat right now. Except you can throw in that prior to the middle of last week, I had never touched installshield. Anyway thanks for the help! – Phillip Schmidt Sep 18 '12 at 15:05
  • Wow. Good luck. It took me many years to be able to pull this stuff of with zero defects. – Christopher Painter Sep 18 '12 at 15:08
  • Well I never said it didn't have any defects :P – Phillip Schmidt Sep 18 '12 at 20:59
  • What I mean to say is MSI behaves really well unless as you stay between the lines. Being a week into it, it's impossible to know where the lines are. Therefore trying to do things like this are very risky. No fault of yours... – Christopher Painter Sep 18 '12 at 21:03
  • Yeah, true. Wanna take a stab at [this one](http://stackoverflow.com/questions/12484811/managed-dll-method-failing-in-installshield#comment16797679_12484811)? – Phillip Schmidt Sep 18 '12 at 21:08