wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
129 stars 24 forks source link

FileSearch could not find vcruntime140.dll though it exists for sure #6914

Closed RoyZhang2022 closed 2 years ago

RoyZhang2022 commented 2 years ago

Triage

Issues are triaged at online meetings, generally held alternate Thursdays at 9:30 a.m. Pacific time (UTC-7/UTC-8). Meeting requests are sent to the wix-devs and wix-users mailing lists, as well as in Discussions.

Discussions and support

Note that discussions are best held on the mailing lists not in issues. Please do not open issues requesting support or debugging help; first start a thread on the wix-users mailing list and open an issue if the discussion suggests a bug in the WiX Toolset or that a feature request is appropriate. You can also try out the beta Discussions feature.

Instructions

Read the sections above. Delete the Triage, Discussions and support, and Instructions sections and fill out the rest.

Bugs

If this issue is a bug:

(WiX version in major.minor.release.build format) 3.11.2.4516

(Visual Studio version, including year and update) Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.1.6

(WiX Toolset Visual Studio Extension version in major.minor.release.build format) 1.0.0.18

(.NET version) 4.8.04084

(Windows version) Windows 11 Enterprise Evaluation version 21H2 OS build: 22000.978

And Windows 10 64 bit Enterprise Evaluation

(Be as specific as you can and err on the side of providing too much information, including code, error messages, command lines you used to invoke the build, and so forth.)

Our application has a dependency for Microsoft VC runtime package. So we created such a bundle file. We have a FileSearch for vcruntime140.dll as VC runtime package condition.

On my local Windows 10 64-bit for uninstallation, C:\Windows\System32\vcruntime140.dll could be found and there is a window pop-up to provide three options for the VC package, "repair", "uninstall" and "close". There is no problem here.

But when I run the uninstallation on a Windows 11 64-bit on an Oracle VM virtual box, the C:\Windows\System32\vcruntime140.dll could not be found though it exists there for sure. As it could not be found the VC package is left untouched. This problem is also seen for a Windows 10 64-bit on an Oracle VM virtual box. I doubt this is a problem that FileSearch could not work well on virtual box. Please help to check. Thanks!

from uninstallation log

[2378:0D54][2022-09-15T14:49:08]i000: File search: wfs6DD5E7565D7EF471587C7377856B66DA, did not find path: C:\Windows\System32\vcruntime140.dll

bundle file

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

<Bundle Name="xxxxx" Version="2.0.0"
          Manufacturer="xxxx" UpgradeCode="......">

    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
          <bal:WixStandardBootstrapperApplication
            LicenseFile="license.rtf"
            ShowVersion="yes"
            />
    </BootstrapperApplicationRef>

    <util:FileSearch Path="[WindowsFolder]System32\vcruntime140.dll" Variable="VCDISTINSTALLED"/>

    <Chain>

      <ExePackage SourceFile="VC_redist.x64.exe"
                  DetectCondition="VCDISTINSTALLED"
                  InstallCommand="/q /ACTION=Install"
                  RepairCommand="/q ACTION=Repair /hideconsole"
                  />

      <MsiPackage SourceFile="myown.msi" />

    </Chain>
  </Bundle>
</Wix>

(Be as specific as you can and err on the side of providing too much information.) We expect FileSearch could find C:\Windows\System32\vcruntime140.dll on Windows on an Oracle virtual box. Then there could be a window pop-up to indicate "repair", "uninstall" and "close" for VC runtime package.

rseanhall commented 2 years ago

This is a duplicate of https://github.com/wixtoolset/issues/issues/5476. If I remember correctly, you can use [WindowsFolder]Sysnative to search the 64-bit System32 folder to workaround this in v3.