26

I am attempting to build an installer with wix.

It compiles and runs. Unfortunately when I run it, I accept the license agreement and hit next, then it explodes.

Error

"The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2819."

Here is the code I am using

Code

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*" Name="rd Installer" Language="1033" Version="1.0.0.0" Manufacturer="hs" UpgradeCode="upgradeCode">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes" />
    
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">        
        <Directory Id="INSTALLFOLDER" Name="rd">
          <Directory Id="BINFOLDER" Name="Bin"/>
          <Directory Id="IMAGEFOLDER" Name="Image"/>
        </Directory>
      </Directory>
    </Directory>

 <DirectoryRef Id="INSTALLFOLDER">     
  <Component Id="CMP_rd1" Guid="guid">
    <File Id="rd1"
         Name="r.d"
         Source="D:\dir\file.txt"
         KeyPath="yes">
    </File>
  </Component>
  <Component Id="CMP_rd2" Guid="guid">
    <File Id="rd2"
         Name="r.d"
         Source="D:\dir\file.txt"
         KeyPath="yes">
    </File>
  </Component>
</DirectoryRef>
<Feature Id="DefaultFeature" Level="1">
  <ComponentRef Id="CMP_rd1"/>
  <ComponentRef Id="CMP_rd2"/>
</Feature>



  <UI Id="UI_ReportDasboard">
      <UIRef Id="WixUI_InstallDir"/>
    </UI>
    
  </Product>  
</Wix>

I've looked at a number of examples and I cant seem to understand what's wrong. My code looks very close to the examples I've seen. Am I missing something?

1

2 Answers 2

84

You need to set the WIXUI_INSTALLDIR property.

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />

More info here

1
1

I was receiving the error 2819 having

   <Control Id="SelectWebSiteList" Type="ListBox" X="20" Y="75" Width="200" Height="150" Sorted="yes" Property="WEBSITE" />

without

    Property="WEBSITE"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.