MSI failure scenario


Viviana Vc

Hi all,

I have an application that is already having implemented it's own
'update' feature. This means once it is installed it checks by itself
for the updates and in case applies them. An update might mean: adding
new files, removing old files, etc.

Now I have to create a MSI installer for my application and by reading
about the technology I noticed a scenario where I could get into
- let's say I have my first msi which besdies others installs a
component with 3 files: a.bmp, b.bmp and c.bmp
- after a while the requirement changes so instead of a.bmp we will have
to have a d.bmp
- so via my application update feature the a.bmp is removed and a new
d.bmp is added
- now the user uninstalls my app which means b.bmp and c.bmp will be
removed, but the d.bmp stays as the uninstaller is not aware of that
- now my new msi installer (the newer version), because of the above
requirement, has a component containing the b.bmp, c.bmp and d.bmp files
and the d.bmp is the key path for the component
- now the above user wants to install this new version using this new
msi installer. This will fail because the installler checks for the
component key path and as d.bmp remained on the harddisk of the user, it
will be detected and the component won't be installed so from the
installation directory the b.bmp and c.bmp files will be missing.

Is my assumption correct?
If yes, is there a way to prevent such failures?

Thank you in advance,



Rob Hamflett

I'm pretty sure what you describe is correct. You could always make
a.bmp or b.bmp your keyfile. Generally though, if you're
adding/removing components from your installation without using the
Windows Installer to do it, you're going to have trouble. You can use
the RemoveFile table to remove the new files on uninstallation, and you
can use wildcards if you won't know the exact names. This might help
work round the problem you described.



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