[wix-users] harvesting two folders for the same Wix project - duplicate id issue

Vilius Šumskas v.sumskas at advantes.tech
Sat May 8 14:54:43 PDT 2021


Hi,

this is more an information dump than a question but, since documentation on Wix and MSI is scarce, I thought I would leave this to anyone thinking like I did, that it is a good idea to use one MSI file for both 32 bit and 64 bit OS. It's NOT!

I've spent hours with XSLT trying to harvest both Java folders and trying to fit it into my installation workflow. If you don't care if your application would be installed into "Programs Files (x86)" on 64bit system, then it could be done. But if you want to follow regulations, you'll get a big red stop at the last minute. Basically ProgramFiles64Folder property is populated with "Program Files (x86)" value in 32 bit MSI installers and there is nothing you can do about it. At least I haven't found a workaround for this.

So, my last question regarding this topic would be: what is the best practice to do Wix installer project if I need 32 bit and 64 bit versions? Should I prepare two different MSI packages, pack them with boostrapper, and choose correct MSI version during installation according to the OS? What about professionals who need MSI for automation then? Maybe a bootstrapper EXE for standard users and separate MSIs for IT pros would be the best option?

-- 
   Vilius

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Vilius Šumskas via wix-users
Sent: Tuesday, April 27, 2021 1:03 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Vilius Šumskas <v.sumskas at advantes.tech>
Subject: Re: [wix-users] harvesting two folders for the same Wix project - duplicate id issue

Thanks! Not sure if this is the best way to do this, but the following seems to work:

        <DirectoryRef Id="INSTALLFOLDER">
            <Directory Id="dirE9BAFA84915768DAF64DD037BAAEA38F" Name="jre">
                <Component Id="cmp1AB11EA02748CB097BF9CE18854DD232" Guid="*">
                   <Condition>NOT VersionNT64</Condition>
                    <File Id="fil29B9784BB5DBC85B9378E978EF516E9B" KeyPath="yes" Source="$(var.JreSourceDir)\jre-32\ASSEMBLY_EXCEPTION" />
                </Component>
            <Directory>
            <Directory Id="dir87602034B74EB26BF6108A6A12EAA6BD" Name="jre">
                <Component Id="cmp420D7A1AC27DB0092DC05B336871FBCF" Guid="*" Win64="yes">
                   <Condition>VersionNT64</Condition>
                    <File Id="fil5771CEE52BB24E375D23B6A9AB40121F" KeyPath="yes" Source="$(var.JreSourceDir)\jre-64\ASSEMBLY_EXCEPTION" />
                </Component>
             </Directory>
         </DirectoryRef>

Now I just need to find a way to set this Condition via XSLT.

-- 
   Vilius

-----Original Message-----
From: Rob Mensching <rob at firegiant.com> 
Sent: Monday, April 26, 2021 4:25 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Vilius Šumskas <v.sumskas at advantes.tech>
Subject: RE: harvesting two folders for the same Wix project - duplicate id issue

Mutually exclusive Component/Conditions?

- - - - - - - - - - - - - - -
I provide short answers on wix-users. Full commercial support is offered by FireGiant at http://www.firegiant.com/services

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Vilius Šumskas via wix-users
Sent: Sunday, April 25, 2021 2:24 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Vilius Šumskas <v.sumskas at advantes.tech>
Subject: Re: [wix-users] harvesting two folders for the same Wix project - duplicate id issue

Hoping to resolve duplicate ID error I Just tried to harvest parent folder containing jre-32 and jre-64 versions, then use XSLT to change destination path to the same folder. Unfortunately, I get hard error instead of a warning:

JRE.wxs(423,0): error LGHT0369: Component/@Id='cmp420D7A1AC27DB0092DC05B336871FBCF' has a @Guid value '{90360289-81C4-51B3-BD9A-8E295C6FF15C}' that duplicates another component in this package. It is recommended to give each component its own unique GUID.

Sample code:
        <DirectoryRef Id="INSTALLFOLDER">
            <Directory Id="dirE9BAFA84915768DAF64DD037BAAEA38F" Name="jre">
                <Component Id="cmp1AB11EA02748CB097BF9CE18854DD232" Guid="*">
                    <File Id="fil29B9784BB5DBC85B9378E978EF516E9B" KeyPath="yes" Source="$(var.JreSourceDir)\jre-32\ASSEMBLY_EXCEPTION" />
                </Component>
            <Directory>
            <Directory Id="dir87602034B74EB26BF6108A6A12EAA6BD" Name="jre">
                <Component Id="cmp420D7A1AC27DB0092DC05B336871FBCF" Guid="*" Win64="yes">
                    <File Id="fil5771CEE52BB24E375D23B6A9AB40121F" KeyPath="yes" Source="$(var.JreSourceDir)\jre-64\ASSEMBLY_EXCEPTION" />
                </Component>
             </Directory>
         </DirectoryRef>

Any ways to workaround this?

-- 
   Vilius

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list