I don't think Wix has a native way to get the version number. However, using 
the Upgrade table, if you define a row for each version you are trying to 
detect, then if the property of that row has the GUID then you know that 
version exists.

Also, you can use the api MsiGetProductInfo in a custom action to find the 
version.
http://msdn.microsoft.com/en-us/library/aa370130(VS.85).aspx


-----Original Message-----
From: Sergey Abakumoff [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 19, 2008 5:50 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Detect the version of already installed product.


I should use OnlyDetect=no to uninstall the prior version if it exists.
Therefore only prior version can be installed at the moment of starting the
new installation.
Then, I mentioned the way of getting assembly version because this is the
common rule of out software - the version of the assembly always is the same
as the version of the installed product.
Currently I use more straightforward way to detect the prior version -
installer writes the registry key with the version number and reads it.
However, this way has obvious disadvantages.
I still would like to know whether Wix has the native way to obtain the
installed product version number.


Wilson, Phil wrote:
>
> It depends how many prior versions you've got as to how cumbersome this
> is, but if you had 1.0, 2.0 and 3.0 then you can simply use upgrade
> elements to detect each of them with onlydetect=yes, and if the
> corresponding property is set show a message.
>
> It's not obvious what version you really want - the product version of
> your installed product is the same as the version of an installed assembly
> only if you deliberately made it the same.
> Phil Wilson
>

--
View this message in context: 
http://n2.nabble.com/Detect-the-version-of-already-installed-product.-tp1344094p1351709.html
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to