MSI Installer VS 2005 Setup Project

L

LostCub

I was told (I suspect incorrectly) to increment the Version of my setup
project every time I build a new MSI or the MSI won't install.

When I do that it tells me to change the ProductCode property of the project
which I suspect is a bad thing but I don't know any better so I do it anyway.

I guess the question is: when should I increment the version of my setup
project? And when I do should I change the ProductCode?
 
P

Pavel Minaev

LostCub said:
I was told (I suspect incorrectly) to increment the Version of my setup
project every time I build a new MSI or the MSI won't install.

If version number is the same, the installer will complain if it sees any of
your previous MSIs already installed on the system - something along the
lines of "This package is already installed on the system".

In general, if you are building an installer with some changed files, you
_should_ increase the version number. It is, after all, a different version
of your application!
When I do that it tells me to change the ProductCode property of the
project
which I suspect is a bad thing but I don't know any better so I do it
anyway.

No, it's fine. There are two codes you have to be aware of - ProductCode and
UpgradeCode.

ProductCode is specific to a specific _version_ of your product. If
ProductCode for two packages matches, then, as far as Windows Installer is
concerned, it's the same package (and then you get the same "already
installed" error). So, if you change the version number, you should indeed
change the ProductCode.

UpgradeCode is more generic, and refers to all versions of your product that
can be upgraded from one to another (and typically cannot be installed side
by side). When run, if your installer will detect any packages on the system
with the same UpgradeCode but smaller version number, it will uninstall them
as part of the installation progress - to the user, it will look as an
upgrade. And if it detects the same UpgradeCode and higher version number,
it will abort installation with a message that a later version is already
installed.
I guess the question is: when should I increment the version of my setup
project? And when I do should I change the ProductCode?

Every time you change one or more files in your setup package.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top