Cannot download VC++ Redist kit in the wix installer

我是研究僧i 提交于 2019-12-12 04:17:21

问题


I have VC++ 2015 Redistributable prerequisites for my application. Here is the code from the wix:

    <!-- Check registry for .NET 4.5.2 -->
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Release" Variable="Netfx46FullVersion" />

<PackageGroup Id="NetFx46">
  <ExePackage
    Id="NetFx46Web"
    DisplayName="Microsoft .NET Framework 4.6"
    DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=528222"
    Compressed="no"
    Cache="yes"
    PerMachine="yes"
    Permanent="yes"
    Vital="yes"
    SourceFile="Redist\NDP46-KB3045560-Web.exe"
    DetectCondition="(Netfx46FullVersion&gt;=393295)"
  />
</PackageGroup>

<!-- Check registry for Visual C++ 2015 Redistributable -->
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\14.0" Result="exists" Variable="VCRedist14" />

<PackageGroup Id="VCRedist14">
  <ExePackage 
    Id="VCRedist14"
    DisplayName="Visual C++ 2015 Redistributable"
    DownloadUrl="https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe"
    Cache="yes"
    Compressed="no"
    PerMachine="yes"
    Permanent="yes"
    Vital="yes"
    SourceFile="Redist\vcredist_x86.exe"
    InstallCommand="/q"
    DetectCondition="VCRedist14=1"
  />
</PackageGroup>

Here is the error from log:

Error 0x80072f19: Failed to send request to URL: https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe, trying to process HTTP status code anyway. Error 0x80072f19: Unknown HTTP status code 0, returned from URL: https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe

I am installing the application on a clean Windows 7. As you can see I am installing .net 4.6 as well and it works.The links work. And a second attempt to install the app succeeds.

How can I make it work form the first attempt?


回答1:


Maybe use the golink instead (x86) http://go.microsoft.com/fwlink/?LinkID=615459&clcid=0x409

See my conversations with Cory in this thread regarding the packages provided with Visual Studio for installers on connect.microsoft.com




回答2:


happened only on one Windows 7 virtual machine, not reproduce-able in other cases. The solution used works fine.



来源:https://stackoverflow.com/questions/34336262/cannot-download-vc-redist-kit-in-the-wix-installer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!