Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to extract single file from WiX MSI #108

Closed
TheLever opened this issue Jul 21, 2018 · 2 comments
Closed

Fails to extract single file from WiX MSI #108

TheLever opened this issue Jul 21, 2018 · 2 comments

Comments

@TheLever
Copy link

Hi,

I was trying to extract a single file from a simple MSI I built using WiX (3.11). Upon trying to extract, I get "An attempt was made to reference a token which does not exist." It seems the code wants to copy the cab, which fails. I see also that it tries to reference a cab in a place where it does exist - maybe it can't handle embedded cabs?

The installer is built using this xml:

  <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
  <Media Id="1" Cabinet="cab1.cab" EmbedCab="yes" />

  <Feature Id="ProductFeature" Title="SimpleInstaller" Level="1">
     <ComponentGroupRef Id="ProductComponents" />
  </Feature>
@TheLever
Copy link
Author

The source xml got truncated, attaching a sample here.
SimpleInstaller.zip

@activescott
Copy link
Owner

@TheLever This is actually an invalid msi. If simply double-click it on windows and attempt to install it you'll see the following message:
screen shot 2018-11-22 at 10 20 42 pm

The problem with it is that -as written- you must include the cab along with the msi. If you want to embed the cab into the msi you must prefix the cab file name with with a number sign. This is explained in the Cabinet MSI docs which is linked to from the Media table docs.

So net net, change your Media line to the following and I believe it will work in lessmsi and windows:

<Media Id="1" Cabinet="#cab1.cab" EmbedCab="yes" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants