[wix-users] Experience of build with WiX 4 Toolset

Timofey Evsyutkin goldghost.oomphi.suppository at gmail.com
Thu Jul 28 03:49:21 PDT 2022


Thanks, Sean!

Your answer kicked me. I am really sorry! I should have provided more
information.
I found out why it happens.
I use embedded transformations to create MUI MSI like this:
@cscript "%_WindowsSdkDir%bin\x86\WiLangId.vbs" "%MSI_PATH%\%MSI_NAME%.msi"
Product %LANGUAGE_ID%
@"%_WindowsSdkDir%bin\x86\MsiTran.exe" -g %MUI_SETUP%
%MSI_PATH%\%MSI_NAME%.msi %UnloadMuiMsiPath%\%CULTURE%.mst
@cscript "%_WindowsSdkDir%bin\x86\WiSubStg.vbs" "%MUI_SETUP%"
"%UnloadMuiMsiPath%\%CULTURE%.mst" %LANGUAGE_ID%
@cscript "%_WindowsSdkDir%bin\x86\WiSubStg.vbs" "%MUI_SETUP%"

Transformation changes the ProductCode during the install.
>> Product Code passed to Engine.Initialize:           ''
>> Product Code from property table before transforms:
'{3B12D03A-FAD1-4EB7-AC3A-1C9C51AF67ED}'
>> Product Code from property table after transforms:
'{3D8554F9-E2B4-40B0-869E-10FADD1EF636}'
>> Product not registered: beginning first-time install
>> Product {3D8554F9-E2B4-40B0-869E-10FADD1EF636} is not managed.

After that I am getting the installed product with two different
ProductCode in the registry.
It looks so strange. I uploaded extra files.
https://drive.google.com/drive/folders/1SIL4xzyd9S5KqbuJmgHNk3qygKpU_aeM?usp=sharing
So, MSI doesn't work as earlier. But It worked with version 3.
I am going to freeze Package/@Id for the MSIs build process and continue my
journey in this way.
However, what should I do if I take strange MSI with embedded
transformations?


Also I tried it out with MSI which has only one language. There is a
similar log:
>> Product Code passed to Engine.Initialize:           ''
>> Product Code from property table before transforms:
'{A9B478AB-23B1-4787-B574-FA71EB79D181}'
>> Product Code from property table after transforms:
'{A9B478AB-23B1-4787-B574-FA71EB79D181}'
>> Product not registered: beginning first-time install
>> Product {A9B478AB-23B1-4787-B574-FA71EB79D181} is not managed.

It works and seems like all good but it is not exactly.

After install and re-run the installer
DetectRelatedMsiPackage event fires only for the x64 package on the x86
operating system,
so MBA has incorrect info about the system state. For example, if I plan
Repair, then the product will be removed.
Should I use bal:PrimaryPackageType?

When I run installer from Package Cache by link I get this error on
register process:
i000: MBA#: EVENT: RegisterBegin
({"RecommendedRegistrationType":2,"RegistrationType":2,"Cancel":false,"HResult":0})
i370: Session begin, registration key:
SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{76B4A6BF-A40F-4C25-BAC1-182F0EF5848A},
options: 0x3, disable resume: No
i000: Caching bundle from:
'C:\Windows\TEMP\{6C28A1FE-C63E-4A96-8A37-66C33029A122}\.be\Boot.exe' to:
'C:\ProgramData\Package
Cache\{76B4A6BF-A40F-4C25-BAC1-182F0EF5848A}\Boot.exe'
e000: Error 0x80070020: Failed to cache bundle from:
'C:\Windows\TEMP\{6C28A1FE-C63E-4A96-8A37-66C33029A122}\.be\Boot.exe' to
'C:\ProgramData\Package
Cache\{76B4A6BF-A40F-4C25-BAC1-182F0EF5848A}\Boot.exe'
e000: Error 0x80070020: Failed to cache bundle from path:
C:\Windows\TEMP\{6C28A1FE-C63E-4A96-8A37-66C33029A122}\.be\Boot.exe
e000: Error 0x80070020: Failed to begin registration session.
e000: Error 0x80070020: Failed to begin registration session in per-machine
process.
i000: MBA#: EVENT: RegisterComplete ({"Status":-2147024864,"HResult":0})
e000: Error 0x80070020: Failed to register bundle.

When I try to Update the installed product I get this error on uninstall a
previous bundle:
i301: Applying execute package: {76B4A6BF-A40F-4C25-BAC1-182F0EF5848A},
action: Uninstall, path: C:\ProgramData\Package
Cache\{76B4A6BF-A40F-4C25-BAC1-182F0EF5848A}\Boot.exe, arguments:
'"C:\ProgramData\Package
Cache\{76B4A6BF-A40F-4C25-BAC1-182F0EF5848A}\Boot.exe" -uninstall
-burn.related.upgrade
-burn.ancestors={5634A379-6E22-40D3-85D8-6C5A4DD609CE}
-burn.filehandle.self=1004'
e000: Error 0x800705b4: Failed to wait for child to connect to pipe.
e000: Error 0x800705b4: Failed to wait for embedded process to connect to
pipe.
e000: Error 0x800705b4: Failed to run bundle as embedded from path:
C:\ProgramData\Package Cache\{76B4A6BF-A40F-4C25-BAC1-182F0EF5848A}\Boot.exe
e000: Error 0x800705b4: Failed to execute related bundle.
e000: Error 0x800705b4: Failed to configure per-machine related bundle.
As a result the previous bundle is not removed. Why don't command line
arguments contain the "-quiet" switch?
Also some Detect events fire twice.

ср, 27 июл. 2022 г. в 00:16, Sean Hall via wix-users <
wix-users at lists.wixtoolset.org>:

> I'm guessing your wxl file was not upgraded to the new namespace:
> http://wixtoolset.org/schemas/v4/wxl. If that's the case, I don't know why
> the toolset isn't giving some kind of error if it had the v3 namespace.
>
> For the bundle, can you run 'wix.exe burn extract path\to\bundle.exe -o
> path\to\outputfolder'? Then upload the BA\manifest.xml file for both
> bundles. I don't understand what I'm seeing in the logs. The CacheId
> ({3B12D03A-FAD1-4EB7-AC3A-1C9C51AF67ED}v1.1.1.1) and dependency provider
> ({3B12D03A-FAD1-4EB7-AC3A-1C9C51AF67ED}_v1.1.1.1) say that the product code
> is '{3B12D03A-FAD1-4EB7-AC3A-1C9C51AF67ED}' but the detected package's
> product code is '{3D8554F9-E2B4-40B0-869E-10FADD1EF636}'.
>
> On Tue, Jul 26, 2022 at 9:11 AM Timofey Evsyutkin <
> goldghost.oomphi.suppository at gmail.com> wrote:
>
> > Thanks, Sean!
> >
> > I'm confused why you brought up missing loc variables. Did you expect
> them
> >> to be found?
> >>
> >
> > Yes, I did. I passed loc.DisplayName from a file by the following command
> > line
> > as similar that as I did with light in WiX Toolset v3:
> >
> > "~\wix_toolset\wix.exe" build -wx^
> >  -ext
> >
> "~\wix_toolset\.wix4\extensions\WixToolset.Bal.wixext\4.0.0-source\tools\WixToolset.Bal.wixext.dll"^
> >  -ext
> >
> "~\wix_toolset\.wix4\extensions\WixToolset.Netfx.wixext\4.0.0-source\tools\WixToolset.Netfx.wixext.dll"^
> >  -ext
> >
> "~\wix_toolset\.wix4\extensions\WixToolset.Util.wixext\4.0.0-source\tools\WixToolset.Util.wixext.dll"^
> >  -arch "x86"^
> >  -culture "en-US"^
> >  -loc "~\test_product\loc\ENU\ENU.wxl"^
> >  -trackingfile "~\temp\test_product\track_boot_ENU_x86.log"^
> >  -intermediatefolder "~\temp\test_product\ENU\"^
> >  -d "PathProductName=test_product"^
> >  -d "ProductSourcesRoot=~"^
> >  -d "SharedComponentsPath=~\src\shared_components"^
> >  -d "SharedSrcPath=~\src\common_code"^
> >  -out ~\test_product\Bundle\ENU\Boot.exe^
> >  -src "~\src\Bundle.wxs"
> >
> > I should not configure wxl for Bundle and add switches "-culture" "-loc"
> > to build commands, is it right?
> >
> > Custom BAs are very complex so it's pretty much impossible to guess
> what's
> >> wrong. It would help if you could provide the Burn log from %TEMP% along
> >> with the relevant code from your BA.
> >>
> >
> > I apologize for misleading you.
> > I looked deeper.
> > The DetectRelatedMsiPackage event (after DetectPackageBegin) determines
> > the incorrect state of the package and features (returns the incorrect
> > operation - Downgrade).
> > It happens even with the expected upgrade.
> > Unfortunately, I can not provide the relevant code from my BA.
> > But the logs here:
> >
> https://drive.google.com/drive/folders/1SIL4xzyd9S5KqbuJmgHNk3qygKpU_aeM?usp=sharing
> >
> > чт, 21 июл. 2022 г. в 22:10, Sean Hall via wix-users <
> > wix-users at lists.wixtoolset.org>:
> >
> >> Thanks for trying it out and reporting your findings here.
> >>
> >> WIX1150 is a warning, you must have opted in to treating warnings as
> >> errors. It was added in v4 and it looks like we missed the Fragment
> >> symbol.
> >> Fragment/@Id is not deprecated, but at the same time it doesn't actually
> >> do
> >> anything.
> >>
> >> WIX8500 is also a warning, and it was also added in v4. The issue that
> it
> >> is warning about existed in v3 as well, it just didn't tell you about
> it.
> >>
> >> I'm confused why you brought up missing loc variables. Did you expect
> them
> >> to be found?
> >>
> >> Custom BAs are very complex so it's pretty much impossible to guess
> what's
> >> wrong. It would help if you could provide the Burn log from %TEMP% along
> >> with the relevant code from your BA.
> >>
> >> On Thu, Jul 21, 2022 at 6:03 AM Timofey Evsyutkin via wix-users <
> >> wix-users at lists.wixtoolset.org> wrote:
> >>
> >> > Hi there
> >> >
> >> > I have recently converted and built a small "Test Project" from v3 to
> >> v4.
> >> > I took 4.0.0-preview.1-build.425 for this and got some errors.
> >> >
> >> > Converter did not cover some situations.
> >> >
> >> > Related to WIX0022 after converting:
> >> > 1. There is an empty condition. For example,
> >> >      <Text><![CDATA[]]></Text>
> >> > 2. There is an inner comment. For example,
> >> >      <Custom Action ... something here ... >
> >> >          <!-- comment of action -->
> >> >          <![CDATA[ ... something here ... ]]]
> >> >      </Custom>
> >> >      <Condition Message="!(loc.UpdateKB2533623NotFound)">
> >> >          <!-- comment of condition -->
> >> >          <![CDATA[NOT ((UpdateKB2533623Exist = "No") AND (VersionNT =
> >> > 601))]]>
> >> >      </Condition>
> >> > 3. There is a condition in include file (wxi). For example,
> >> >      <Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
> >> >          <Condition Message="!(loc.InvalidOsVersion)">
> >> >              <![CDATA[NOT (VersionNT < 601)]]>
> >> >          </Condition>
> >> >      </Include>
> >> >
> >> > Related to WIX1150. For example,
> >> >      ~\test_product\fragments.wxi(7) : error WIX1150:
> >> >      The binder doesn't know how to place the following symbol into
> the
> >> > output:
> >> >      SymbolName: 'WixFragment', Id: 'MsiPackages'
> >> > Are identifiers of fragments deprecated?
> >> >
> >> > I submitted it because the converter did not mark them as an error.
> >> > However it is taking place when you are building with wix.
> >> >
> >> > When I was building a Bundle, I got these errors:
> >> > ~\test_product\components\test_product.wxi(21) : error WIX8500:
> >> > The Payload 'cabqsnbgoiL2yJhlIDGB7CrS2Lfb7k' has a duplicate Name
> >> > 'setup.cab' in the attached container.
> >> > When extracting the bundle with dark.exe, the file will get
> overwritten.
> >> > ~\test_product\components\test_product.wxi(12) : error WIX8501:
> >> > The location of the payload related to the previous error.
> >> >
> >> > I suppressed them, is it ok?
> >> >
> >> > Also I've got these errors:
> >> > ~\src\Bundle.wxs(55) : error WIX0102:
> >> > The localization variable !(loc.DisplayName) is unknown.  Please
> ensure
> >> the
> >> > variable is defined.
> >> > ~\src\Bundle.wxs(11) : error WIX0102:
> >> > The localization variable !(loc.DisplayName) is unknown.  Please
> ensure
> >> the
> >> > variable is defined.
> >> > ~\src\Bundle.wxs(11) : error WIX0102:
> >> > The localization variable !(loc.DisplayName) is unknown.  Please
> ensure
> >> the
> >> > variable is defined.
> >> >
> >> > I "fixed" my code. After that I got MSIs and EXE-installer. MSI works
> >> fine
> >> > as expected.
> >> > However, I noticed strange behavior with EXE.
> >> > After a successful installation, when I run the installer again,
> >> > the bootstrapperCommand is determined to downgrade.
> >> > It was expected that there would be an opportunity to choose an
> action:
> >> > modify/repair/remove.
> >> > But when I skipped the downgrade action in debugging and chose the
> >> remove
> >> > action,
> >> > the uninstall didn't happen.
> >> > note: I use WixManagedBootstrapperApplicationHost and
> >> > WixDotNetCoreBootstrapperApplicationHost.
> >> > What am I doing wrong? Can I influence the engine through events or
> >> should
> >> > I not do this?
> >> > I do not expect a detailed answer, at least the direction where to
> move.
> >> > Thanks.
> >> >
> >> > --
> >> > Best Regards, Timofey Evsyutkin
> >> > P.H.D., Software Engineer
> >> >
> >> >
> >> > CONFIDENTIALITY NOTICE: The information contained in this email and
> >> > attached document(s) may contain confidential information that is
> >> intended
> >> > only for the addressee(s). If you are not the intended recipient, you
> >> are
> >> > hereby advised that any disclosure, copying, distribution or the
> taking
> >> of
> >> > any action in reliance upon the information is prohibited. If you have
> >> > received this email in error, please immediately notify the sender and
> >> > delete it from your system.
> >> >
> >> > ____________________________________________________________________
> >> > WiX Toolset Users Mailing List provided by FireGiant
> >> > http://www.firegiant.com/
> >> >
> >>
> >> ____________________________________________________________________
> >> WiX Toolset Users Mailing List provided by FireGiant
> >> http://www.firegiant.com/
> >>
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/



More information about the wix-users mailing list