views:

569

answers:

2

So I botched an msi installer and deployed it after only testing installation, not uninstall (bad I know, added running of an exe after install, but forgot to specify that it should only occur on install not uninstall).

I found the Windows Installer Cleanup util, and the related msizap that I'll use to automate the process. The problem now is that when a newer version is installed on top afterwards, the advertised shortcut still tries to do a repair (or whatever it's actually doing trying to load the old version) and fails. Running the program directly from the file works fine, but I need to remove the advertised shortcuts in an automated way. It doesn't need to be incredibly robust, fairly small private beta install-base right now, so can assume that shortcuts are in the originally installed locations of desktop and start menu.

Are there any special concerns I need to take into account for an advertised shortcut or can I just treat it as any other file and just remove it?

+1  A: 

AFAIK adverited shortcuts are responsible for doing the setup.
Those are special lnk files that have point to the installer with a spicel param that will preform the setup when they are activated (you can see the info with notepad or hex editor).
never the less, MSI zap should have remove all trace of the setup.
Does the setup runs if you do a zap then press the shortcut? or you get an error?

Shay Erlichmen
It shows an error that says "The parameter is incorrect" but when I install the new version after doing so it tries to run setup and shows some error (can't recall what it was atm)
Davy8
It make sense that the short cuts don't work after zapping, but which error you get after installing the new version?
Shay Erlichmen
Hmm, figures, now it's not reproducible. Another Heisenbug I guess
Davy8
I'm pretty sure that zapping and deleting the shortcuts is good enough (in the given circumstances of course) .
Shay Erlichmen
+1  A: 

As far as the shortcut is concerned, it's just a normal file that can be deleted.

However I'll caution you about using MSIZAP - it is really a last resort and leaves a lot of information behind, shared DLL counts, registry entries, files, etc. Once removing the Windows Installer information you then need to remove any information related to your program from the registry. SharedDLL ref counts are the worst thing as they'll screw up when you try to reinstall/uninstall with the new MSI.

Rob has a good post up detailing some of the pitfalls of using MSIZAP. It's not something you want to use unless you're prepared to manually hunt down all the registry information it leaves behind.

sascha

related questions