I have been tasked with creating an "major update" for a product that was previously installed in per-user mode (this is a setup created in VS 2005), the new version is now going to use all-user (per-machine) mode so I need a way for the upgrade procedure to determine the previous context and remove that instance before proceeding with the install of the new version.
I understand that Windows Installer will not find products installed in a different context so I need a custom action to locate the previous install and remove it. Can anyone point me at a sample or some advice?
Thanks!
Bruce
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
How to upgrade per-user or all-users?
Started by
barees63
, Dec 05 2006 04:37
2 replies to this topic
Posted 06 December 2006 - 11:16
This will only work if the per-user install had been made by the same user that now installs the new version per-machine. You should use an exe that first invokes the uninstall of the old version then launches the install of the new version.
Stefan Krüger
InstallSite.org twitter facebook
Posted 08 December 2006 - 01:50
Thanks for the reply Stefan,
The installer I'm using does uninstall previous versions (via upgrade code I believe) but if the previous install was per-user then the new "per machine" installer won't find it and there will be two copies of the product installed.
I have seen a rather complex article on overriding the function that searches for previous installations to make it find previous installs regardless of context but this was for Windows Installer 2 and involved editing the MSI tables etc, I was hoping there might be an easier way.. it seems like a pretty silly "bug" in windows installer..
In a perfect world I would still be using InstallShield which apparently handles this situation but our current product is a large and complex .NET 2 application and IS12 is very broken in this environment (ie dependency scans don't work, it crashes with more than one project per solution etc etc).
Cheers,
Bruce
The installer I'm using does uninstall previous versions (via upgrade code I believe) but if the previous install was per-user then the new "per machine" installer won't find it and there will be two copies of the product installed.
I have seen a rather complex article on overriding the function that searches for previous installations to make it find previous installs regardless of context but this was for Windows Installer 2 and involved editing the MSI tables etc, I was hoping there might be an easier way.. it seems like a pretty silly "bug" in windows installer..
In a perfect world I would still be using InstallShield which apparently handles this situation but our current product is a large and complex .NET 2 application and IS12 is very broken in this environment (ie dependency scans don't work, it crashes with more than one project per solution etc etc).
Cheers,
Bruce
Edited by barees63, 08 December 2006 - 01:54.