3

Moving to WiX 3.6, I'm trying to make use of burn features to ease potential download/install of required pieces, such as a specific VC++ runtime.

I started small with just some "test.wxs", see below, which is OK for candle.exe:

$ candle test.wxs
Windows Installer Xml Compiler version 3.6.3303.0
Copyright (C) Outercurve Foundation. All rights reserved.

test.wxs

But light.exe chokes on it:

$ light test.wixobj -ext WixBalExtension
Windows Installer Xml Linker version 3.6.3303.0
Copyright (C) Outercurve Foundation. All rights reserved.

light.exe : error LGHT0103 : The system cannot find the file '' with type ''.

Could someone help with this (rather cryptic) error message?

It seems related to RemotePayload, since a modified version with local file works correctly. However, I'd like to save on package size and leave the downloading on the target machine if so needed.

Full content of "test.wxs" was:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Bundle Version="1.0.0.0" 
            UpgradeCode="e349236d-6638-48c5-8d8b-db47682b9aeb">
        <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
        <Chain>
            <!-- C++ Runtime -->
            <ExePackage Name="vcredist_x64.exe"
                        DownloadUrl="http://www.microsoft.com/en-us/download/confirmation.aspx?id=2092" >
                <RemotePayload CertificatePublicKey="F321408E7C51F8544B98E517D76A8334052E26E8" 
                               CertificateThumbprint="D57FAC60F1A8D34877AEB350E83F46F6EFC9E5F1" 
                               Description="Microsoft Visual C++ 2008 Redistributable Setup" 
                               Hash="13674C43652B941DAFD2049989AFCE63CB7C517B" 
                               ProductName="Microsoft Visual C++ 2008 Redistributable" 
                               Size="4961800" 
                               Version="9.0.30729.17" />
            </ExePackage>
        </Chain>
    </Bundle>
</Wix> 
Austin Henley
  • 4,625
  • 13
  • 45
  • 80
user2132334
  • 111
  • 1
  • 5

3 Answers3

4

Partial answer to my own question: The error message disappears if I add the attribute Compressed="no" to the ExePackage element.

Documentation about "Compressed" attribute says: "Whether the package payload should be embedded in a container or left as an external payload" and its value can be "yes", "no", or "default".

Using "yes" or "default" triggers the error message. Using "no" doesn't.

user2132334
  • 111
  • 1
  • 5
2

I had the same trouble with another package (the .NET framework) and Wix 3.7. I used the Wix source code to find the appropriate package names and registry keys to test, and then pasted the relevant bits into my installer. Then, I intentionally set 'Compressed="yes"' because I wanted to embed the file in my installer instead of having it downloaded.

There was a report similar to yours posted in this mailing list thread:

Benjamin Mayrargue: If an ExePackage has a DownloadUrl and Compressed is set to yes, light failed with error LGHT0103: The system cannot find the file '' with type ''.

Markus Wehrle: Ok, I see. If you want to have the ExePackage compressed into your bootstrapper.exe (compressed="yes") you need to specify it using "Source" attribute. Cause it will be compressed into your boostrapper during compile time, you must not declare a DownloadUrl. If you specifiy compressed="no" your ExePackage gets downloaded from the DownloadUrl during the installation of your boostrapper.

Rob Mensching: More specifically, you cannot use RemotePayload element and Compressed='yes' on the ExePackage element together. That doesn't make sense and the bug here is that the compiler didn't give you an error message here saying that.

So yes, you've correctly identified the same fix to the problem.

The Compressed attribute, by the way, specifies 'Whether the package payload should be embedded in a container or left as an external payload.' That external payload can either be a RemotePayload or another file on the disk, but the typical setup is a single bootloader with all the resources embedded into it.

Using yes for the Compression attribute will allow your application and the VC++ runtime to be installed even if the user has a slow or nonexistent Internet connection. Remove the DownloadUrl and RemotePayload from your installer, and replace them with just Compressed="yes" like this:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Bundle Version="1.0.0.0"
          UpgradeCode="e349236d-6638-48c5-8d8b-db47682b9aeb">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
    <Chain>
      <!-- C++ Runtime -->
      <ExePackage Name="vcredist_x64.exe"
                  Compressed="yes">
      </ExePackage>
    </Chain>
  </Bundle>
</Wix>

Then download the vcredist_x64.exe file (yourself, once) and place it adjacent to your test.wxs file. Adjust 'Name' if you want it in a different location. Note that this will increase the size of your resulting bootstrapper by about the size of vcredist_x64.exe, so it's not a good idea if your users will be downloading your installer.

kvermeer
  • 458
  • 3
  • 12
0

In my case the error was thrown because the filename/directory path was over 255 characters. The file exist yet the compiler is stating that the file doesn't exist.

sree
  • 2,287
  • 28
  • 26