[wix-users] Enforce either 32-bit or 64-bit [P]

Mihajlo Cvetanović mcvetanovic at gmail.com
Tue Nov 24 10:29:37 PST 2015


Thanks for the answer, but acting on "I would have the same upgrade code
but different Product GUID" I'm not getting needed result. The rest of the
answer I didn't use. Anyway, when I fix the upgrade code and set the
product code to "*" I get two msi files that can be installed alongside
(don't want that). Either I am doing something wrong, or I have wrong
expectations. I want to prevent the situation where both 32-bit and 64-bit
setups are installed. How to do that? var.UpgradeGUID is set in only one
place to a fixed value. My hopefully relevant code (Wix is 3.6, Visual
Studio is 2008):

  <Product Id="*"
    Name="$(var.ProductName) $(var.PlatformInfo)"
    Language="!(loc.LANG)"
    Version="$(var.ProductVersion)"
    Manufacturer="$(var.Manufacturer)"
    UpgradeCode="$(var.UpgradeGUID)">

    <Package Id= '*'
      Keywords="$(var.ProductName) Installer"
      Description="$(var.ProductName) Installer"
      InstallerVersion="301"
      Compressed="yes"
      Platform="$(var.PackagePlatform)"/>

    <MajorUpgrade DowngradeErrorMessage="!(loc.NewerVersionInstalled)"/>



On Mon, Nov 23, 2015 at 4:07 PM, Steven Ogilvie <Steven.Ogilvie at titus.com>
wrote:

> Classification: Public
> Remmeber that 32 bit apps must be installed by 32 bit MSI and 64 bit apps
> should be installed by 64 bit MSI's
>
> I would have the same upgrade code but different Product GUID
>
> My WiX project builds both 32 and 64 bit MSI's (build one, then the other
> using the release configuration)
>
> i.e.
>
> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
>     <OutputName>Product_Setup_x86</OutputName>
>     <OutputPath>$(Env1)\Installers\</OutputPath>
>
> <IntermediateOutputPath>obj\$(Configuration)\$(Platform)\</IntermediateOutputPath>
>     <DefineConstants>Debug;ProductVersion=$(BuildNumber)</DefineConstants>
>   </PropertyGroup>
>   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
> 'Release|x86' ">
>     <OutputName>Prodcut_Setup_x86</OutputName>
>     <OutputPath>$(Env1)\Installers\</OutputPath>
>
> <IntermediateOutputPath>obj\$(Configuration)\$(Platform)\</IntermediateOutputPath>
>     <DefineConstants>ProductVersion=$(BuildNumber)</DefineConstants>
>     <SuppressPdbOutput>True</SuppressPdbOutput>
>   </PropertyGroup>
>   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64'
> ">
>     <OutputName>Product_Setup_x64</OutputName>
>     <OutputPath>$(Env1)\Installers\</OutputPath>
>
> <IntermediateOutputPath>obj\$(Configuration)\$(Platform)\</IntermediateOutputPath>
>     <DefineConstants>Debug;ProductVersion=$(BuildNumber)</DefineConstants>
>   </PropertyGroup>
>   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
> 'Release|x64' ">
>     <OutputName>Product_Setup_x64</OutputName>
>     <OutputPath>$(Env1)\Installers\</OutputPath>
>
> <IntermediateOutputPath>obj\$(Configuration)\$(Platform)\</IntermediateOutputPath>
>     <DefineConstants>ProductVersion=$(BuildNumber)</DefineConstants>
>     <SuppressPdbOutput>True</SuppressPdbOutput>
>   </PropertyGroup>
>
> In the solution:
>
> GlobalSection(SolutionConfigurationPlatforms) = preSolution
>                 DebugX64|Mixed Platforms = DebugX64|Mixed Platforms
>                 DebugX86|Mixed Platforms = DebugX86|Mixed Platforms
>                 ReleaseX64|Mixed Platforms = ReleaseX64|Mixed Platforms
>                 ReleaseX86|Mixed Platforms = ReleaseX86|Mixed Platforms
>         EndGlobalSection
>         GlobalSection(ProjectConfigurationPlatforms) = postSolution
>                 {some GUID}.DebugX64|Mixed Platforms.ActiveCfg = Debug|x64
>                 {some GUID}.DebugX64|Mixed Platforms.Build.0 = Debug|x64
>                 {some GUID}.DebugX86|Mixed Platforms.ActiveCfg = Debug|x86
>                 {some GUID}.DebugX86|Mixed Platforms.Build.0 = Debug|x86
>                 {some GUID}.ReleaseX64|Mixed Platforms.ActiveCfg =
> Release|x64
>                 {some GUID}.ReleaseX64|Mixed Platforms.Build.0 =
> Release|x64
>                 {some GUID}.ReleaseX86|Mixed Platforms.ActiveCfg =
> Release|x86
>                 {some GUID}.ReleaseX86|Mixed Platforms.Build.0 =
> Release|x86
>         EndGlobalSection
>
> Build both 32 and 64 bit MSI's
> Then I have a bundle package that runs the product based on the bitness of
> the OS
>
> Steve
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
> Of Mihajlo Cvetanovic
> Sent: November-23-15 9:54 AM
> To: wix-users at lists.wixtoolset.org
> Subject: [wix-users] Enforce either 32-bit or 64-bit
>
> Until now I had several setups for 32-bit app built in Wix. There's
> MajorUpdate tag, and everything works fine. Now I want to introduce setups
> for latest 32-bit and also 64-bit app. There's no reason users should have
> both installed, so I'd like to prevent that. What you usually do in this
> situation? Can I just have two .msi files with identical Upgrade and
> Product GUIDs? Is there a drawback to this option, are there caveats? For
> instance should I have different GUIDs in two setups for all my components,
> and are there similar issues? This should be a common problem, but my
> google skills failed me this time.
>
> For new setup I'm tinkering with both of the GUIDs different, but with
> additional entries in Upgrade table, like this:
>
>     <!-- old 32-bit to new 64-bit -->
>     <?if $(var.Platform) = "x64" ?>
>     <Upgrade Id="$(var.UpgradeGUID_x86)">
>       <UpgradeVersion Minimum="0.0.0" OnlyDetect="no"
> Property="REPLACE32BIT" />
>     </Upgrade>
>     <?endif?>
>
>     <!-- old 64-bit to new 32-bit -->
>     <?if $(var.Platform) = "x86" ?>
>     <Upgrade Id="$(var.UpgradeGUID_x64)">
>       <UpgradeVersion Minimum="0.0.0" OnlyDetect="no"
> Property="REPLACE64BIT" />
>     </Upgrade>
>     <?endif?>
>
> Unfortunately this solution allows for some old 32-bit setup to be
> installed alongside with new 64-bit setup. I want to prevent that, but not
> sure how. If using identical GUIDs is an acceptable option then I wouldn't
> need to work around with this code.
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
>
>
>
>
> This message has been marked as Public by Steven Ogilvie on November-23-15
> 10:07:16 AM.
>
> The above classification labels were added to the message by TITUS Message
> Classification.
> For more information visit www.titus.com.
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-users mailing list