Page 1 of 1
installing older version next to the newer
Posted: Thu Oct 13, 2011 6:22 am
by Bar_BQ
Hi,
I was reported about strange problem during installation our program where at least one other version already exists. Currently we have two versions, say 4 and 5, where difference between them is significant and they have different product codes. I checked it and that is true: if version 5 is already installed, then version 4 cannot be installed - unknown error occurs and that's it.
What is causing this behavior?
Does only way to install both is to remove the newer version and install older version first?
Thanks,
BarBQ
Re: installing older version next to the newer
Posted: Thu Oct 13, 2011 8:56 am
by giaviv
Yep, ether that or you can use the Transform Instance command:
Code: Select all
Transform Instance
This command allows new installations of an already installed product on the same system. Normally Windows Installer allows only a single instance of a product to be installed on a computer. Starting setup again with an existing instance allows to modify, repair, or uninstall that instance only. Beginning with Windows Installer 3.0, it is possible to install multiple copies of a product on the same system using instance transforms. However Windows Installer 3.0 or later is required (and this version of Windows Installer is unavailable on Windows 9X operating systems), along with certain restrictions in package authoring which must be observed.
The Transform Instance command allows multiple instances of a product to be installed on all Windows versions, including Windows 9X operating systems, and without any restrictions in package authoring. This command updates internal installer settings and variables to allow reinstallation of an already installed product, as if it had not been installed before. No manual instance transforms are required.
The following table summarizes the variables that are affected by this command:
Variable Change
PRODUCTCODE A new product code identifies the installation as a new product to Windows Installer.
REVISIONCODE A new revision code identifies the setup database as a new product to Windows Installer.
TARGETDIR The destination directory is re-initialized with the default value (instead of the first chosen value).
STARTMENU The start menu folder is re-initialized with the default value (instead of the first chosen value).
ALLUSERS The install for all users/install for just me option is re-initialized with the default value.
MAINTENANCE Reset if another instance of the same version of the product was already installed.
NEEDSUPGRADE Reset if another version of the same product was already installed.
UNINSTALLLINK Set to the new location of the product uninstallation program.
Transform Instance has no effect when used if the NEWINSTANCE variable is FALSE. The NEWINSTANCE pre-defined variable indicates whether the setup may spawn new instances at runtime. New instances may only be spawned when at least one instance of setup has already been installed, and when setup has not been launched from the Control Panel Add-Remove Programs applet for one of the existing instances (which is the only place to repair, modify, or uninstall existing instances in multi-instance setups).
Warnings
After using Transform Instance, the TITLE pre-defined variable must be updated with a unique description of this latest new instance of setup. Because setup instances are identified in the Control Panel Add-Remove Programs applet by their names (as stored in the TITLE variable), each new instance must have a unique name.
If the TITLE pre-defined variable is not uniquely updated for each product instance, an existing installation listing in the Control Panel Add-Remove Programs applet may be overwritten when the transformed setup finishes execution. This will orphan the former instance carrying the same name on the system and should be avoided.
Notes
Manually updating the variables updated by Transform Instance does not create a new instance - this command updates certain internal installation properties and must be called when a new instance is required.
The Multiple Instances sample installation available in the New Project dialog contains example code which illustrates the correct usage of the Transform Instance command. This code may also be reused in your existing setups to add multiple instance behavior.