Groups | Blog | Home
all groups > dotnet setup > january 2006 >

dotnet setup : How to install the same MSI setup over and over again on the same machine


orencs NO[at]SPAM gmail.com
1/29/2006 12:15:36 AM
Hi All,

First I want to say thank you to Phil Wilson for his great book: The
Definitive Guide to Windows Installer.
Unfortunately I didn't found a specific issue in the book.
Hope you can help.
The MSI setup use the ProductCode which help us maintain versions by
detecting preinstall setup.
BUT, what should I do if I want to install the same setup over and over
again.
I am installing Web Service which is connected to a Database.
I want to install several Web Services on the same machine because I
have more than one Database.
In each installation the user pick new name for the Web Service and a
new database name.

If I use the MSI setup it detects, after the first installation, that
the setup already installed.

I would like to know how can I achieve this?

Thanks in advance,

Oren,
Phil Wilson
2/1/2006 7:34:29 AM
You can't literally install the same setup over and over again because of
the identical ProductCode, as you've discovered You're probably using Visual
Studio, so set RemovePreviousVersions in the setup project's properties, and
increment version every time you have a new setup. This will prompt you to
change a couple of codes, say Ok. This will give you a setup that uninstalls
the old one and installs the new one, in Windows Installer terms a major
upgrade.
--
Phil Wilson
[Microsoft MVP-Windows Installer]

[quoted text, click to view]

orencs NO[at]SPAM gmail.com
2/1/2006 1:29:33 PM
Hi Phil,

Thank you for your response.
I knew that from your book.

Still it does not solve the talk about issue.

In some case, like mine, you need to install the same setup again on
the same machine.
When I am saying again I don't mean upgrade of any kind. I mean the
same setup.

As I have stated my setup installs web service lets call it WS-A.The
WS-A is configured during installation to connect to a certain DB lets
call it DB-A.
Now I want to install the same setup again only this time I am calling
the web service WS-B which is cconfigured to connect to DB-B.
In the second time I am running the setup I don't want to uninstall the
previous.
I don't want to force the client to buy Server for each Web Service,
when I know that few Web Services can run well on one.

I hope I wan't clear in the first place and that there is a workaround,
after all you are Mr. MSI, else I would have to change the registry
enteries (the install and uninstall GUIDs).

Thanks

Oren.
Phil Wilson
2/2/2006 7:44:01 AM
You'll have to rebuild the MSI file with a different ProductCode, then
Windows will see it as a different product and it can be installed on the
same system. If the client already has the MSI and wants to run it again,
you can't hack the registry to let the client run the same MSI file again.
It needs a new ProductCode. There are APIs into MSI files that can do that,
changing the Product and Package codes in an MSI file so that it looks like
a different product. So it all depends on whether you are rebuilding the MSI
or the client wants to install it again and can't directly rebuild it.
--
Phil Wilson
[Microsoft MVP-Windows Installer]

--
Phil Wilson
[Microsoft MVP-Windows Installer]
[quoted text, click to view]

AddThis Social Bookmark Button