title: Wix error code 2343
body: <p>I am packaging a MSI using WIX. The binaries need to be installed on a UNC drive (\share\xxxz\east). The installation works fine, the binaries are installed on the UNC, but I get the following error during uninstallation.</p>
  
  <p><strong>"The installer has encountered an unexpected error installing the package. This may indicate a problem with this package. The error code is 2343."</strong></p>
  
  <p><em>What's driving me crazy is why the installation works and the uninstall fails!</em></p>
  
  <p>Below is what my wix script looks like...</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  </code></pre>
  
  <p>
    
    </p>
  
  <pre><code>&lt;!-- Create the package per machine and not per user --&gt;
  &lt;Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /&gt;    
  
  &lt;!-- Package the binaries in the msi --&gt;
  &lt;Media Id="1" Cabinet="CABIIS.cab" EmbedCab="yes" /&gt;
  
  &lt;!-- Default the asp.net framework to 4.0 --&gt;
  &lt;Property Id="FRAMEWORKBASEPATH"&gt;
    &lt;RegistrySearch Id="FindFrameworkDir" Root="HKLM" Key="SOFTWARE\Microsoft\.NETFramework" Name="InstallRoot" Type="raw"/&gt;
  &lt;/Property&gt;
  &lt;Property Id="ASPNETREGIIS" &gt;
    &lt;DirectorySearch Path="[FRAMEWORKBASEPATH]" Depth="4" Id="FindAspNetRegIis"&gt;
      &lt;FileSearch Name="aspnet_regiis.exe" MinVersion="4.0.3"/&gt;
    &lt;/DirectorySearch&gt;
  &lt;/Property&gt;
  &lt;CustomAction Id="WebAppIISVersionSetup" Directory="TARGETDIR" ExeCommand="[ASPNETREGIIS] -norestart -ir" Return="check"/&gt;
  &lt;InstallExecuteSequence&gt;
    &lt;Custom Action="WebAppIISVersionSetup" After="InstallFinalize"&gt;ASPNETREGIIS AND NOT Installed&lt;/Custom&gt;
    &lt;Custom Action="**SetInstallLocationRootDirectory**" After="CostFinalize"  /&gt;
  &lt;/InstallExecuteSequence&gt;
  
  &lt;!-- Set the install location from the trigger file --&gt;
  &lt;CustomAction
    Id="SetInstallLocationRootDirectory"
    Directory="INSTALLLOCATION"
    Value="[TARGET.INSTALLLOCATION]" /&gt;
  
  &lt;!-- Properties &amp; Variables --&gt;
  &lt;WixVariable Id="WixUIBannerBmp" Value="Resources/CeLogo.bmp" /&gt;
  &lt;WixVariable Id="WixUIDialogBmp" Value="Resources/MidstreamChangeTeam.bmp" /&gt;
  &lt;Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" /&gt;
  &lt;Property Id="CALCULATION.SERVICE.USERNAME" Value="xx\"/&gt;
  &lt;Property Id="CALCULATION.SERVICE.PASSWORD" Hidden="yes" /&gt;
  
  &lt;!-- The directory structure for installation --&gt;
  &lt;Directory Id="TARGETDIR" Name="SourceDir"&gt;
    &lt;Directory Id="INSTALLLOCATION" Name="East"&gt;        
      &lt;Directory Id="WEBSITESFOLDER" Name="Website" &gt;
        &lt;Directory Id="EASTROOTFOLDER" Name="EastRoot"  /&gt;
        &lt;Directory Id="WCFCALCULATIONFOLDER" Name="CalculationService" /&gt;
      &lt;/Directory&gt;
      &lt;Directory Id="LOGFOLDER" Name="Log"/&gt;
    &lt;/Directory&gt;
  &lt;/Directory&gt;
  
  &lt;!-- The features in the product --&gt;
  &lt;Feature Id="ProductFeature" Title="East Components" Level="1"&gt;
    &lt;ComponentGroupRef Id="CalculationServiceComponents" /&gt;
  &lt;/Feature&gt;
  
  &lt;!-- Create a UI for the installer --&gt;
  &lt;UI Id="EAST_InstallUI"&gt;
    &lt;TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" /&gt;
    &lt;TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" /&gt;
    &lt;TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" /&gt;
  
    &lt;Property Id="DefaultUIFont" Value="WixUI_Font_Normal" /&gt;
    &lt;Property Id="WixUI_Mode" Value="InstallDir" /&gt;
  
    &lt;DialogRef Id="BrowseDlg" /&gt;
    &lt;DialogRef Id="DiskCostDlg" /&gt;
    &lt;DialogRef Id="ErrorDlg" /&gt;
    &lt;DialogRef Id="FatalError" /&gt;
    &lt;DialogRef Id="FilesInUse" /&gt;
    &lt;DialogRef Id="MsiRMFilesInUse" /&gt;
    &lt;DialogRef Id="PrepareDlg" /&gt;
    &lt;DialogRef Id="ProgressDlg" /&gt;
    &lt;DialogRef Id="ResumeDlg" /&gt;
    &lt;DialogRef Id="UserExit" /&gt;
  
    &lt;Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3"&gt;1&lt;/Publish&gt;
    &lt;Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"&gt;&lt;![CDATA[WIXUI_INSTALLDIR_VALID&lt;&gt;"1"]]&gt;&lt;/Publish&gt;
  
    &lt;Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999"&gt;1&lt;/Publish&gt;
  
    &lt;Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg"&gt;1&lt;/Publish&gt;
  
    &lt;Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg"&gt;1&lt;/Publish&gt;
    &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1"&gt;1&lt;/Publish&gt;
    &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2"&gt;NOT WIXUI_DONTVALIDATEPATH&lt;/Publish&gt;
    &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"&gt;&lt;![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID&lt;&gt;"1"]]&gt;&lt;/Publish&gt;
    &lt;Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="ServiceIdentityDlg" Order="4"&gt;WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"&lt;/Publish&gt;
    &lt;Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1"&gt;1&lt;/Publish&gt;
    &lt;Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2"&gt;1&lt;/Publish&gt;
  
    &lt;Publish Dialog="ServiceIdentityDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" &gt;1&lt;/Publish&gt;
    &lt;Publish Dialog="ServiceIdentityDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg"&gt;1&lt;/Publish&gt;
  
    &lt;Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ServiceIdentityDlg" Order="1"&gt;NOT Installed&lt;/Publish&gt;
    &lt;Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2"&gt;Installed&lt;/Publish&gt;
  
    &lt;Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg"&gt;1&lt;/Publish&gt;
  
    &lt;Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg"&gt;1&lt;/Publish&gt;
    &lt;Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg"&gt;1&lt;/Publish&gt;
    &lt;Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg"&gt;1&lt;/Publish&gt;
  
    &lt;!--&lt;Dialog Id="DatabaseDlg" Title="!(loc.DatabaseDlg_Title)" X="50" Y="50" Width="370" Height="270"&gt;
      &lt;Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="369" Height="44" Text="WixUI_Bmp_Banner" Disabled="yes" /&gt;
      &lt;Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.DatabaseDlgTitle)" /&gt;
      &lt;Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.DatabaseDlgDescription)" /&gt;
      &lt;Control Id="BannerLine" Type="Line" X="0" Y="44" Width="373" Height="0" Disabled="yes" /&gt;
      &lt;Control Id="BottomLine" Disabled="yes" Height="1" Type="Line" Width="370" X="0" Y="234" /&gt;
      --&gt;
    &lt;!--&lt;Control Id="DatabaseServerLabel" Text="!(loc.DatabaseServerLabel)" Type="Text" Width="100" Height="18" X="20" Y="102" /&gt;
      &lt;Control Id="DatabaseServer" Type="Edit" X="130" Y="100" Width="120" Height="18" Property="DB.SERVER" /&gt;
      &lt;Control Id="DatabaseDlgText" Text="!(loc.DatabaseDlgText)" Type="Text" Width="330" Height="30" X="20" Y="60" /&gt;--&gt;
    &lt;!--
      &lt;Control Id="LogFileLabel" Text="!(loc.LogFileNameLabel)" Type="Text" Width="100" Height="18" X="20" Y="137" /&gt;
      &lt;Control Id="LogFileName" Type="Edit" X="130" Y="135" Width="120" Height="18" Property="LOGFOLDER" /&gt;
      --&gt;
    &lt;!--&lt;Control Id="UnprocessedFileLocationLabel" Text="!(loc.UnprocessedFileLocationNameLabel)" Type="Text" Width="100" Height="18" X="20" Y="172" /&gt;
      &lt;Control Id="UnprocessedFileLocationName" Type="Edit" X="130" Y="170" Width="120" Height="18" Property="UNPROCESSEDFILELOCATION" /&gt;--&gt;
    &lt;!--
      &lt;Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" /&gt;
      &lt;Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="!(loc.WixUINext)" Disabled="no" Default="yes" &gt;
      &lt;/Control&gt;
      &lt;Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Text="!(loc.WixUICancel)" Cancel="yes"&gt;
        &lt;Publish Event="SpawnDialog" Value="CancelDlg"&gt;1&lt;/Publish&gt;
      &lt;/Control&gt;
    &lt;/Dialog&gt;--&gt;
  
    &lt;Dialog Id="InvalidUsernamePasswordDlg" Y="10" Width="260" Height="85" Title="!(loc.InvalidUsernamePasswordDlg_Title)"&gt;
      &lt;Control Id="Text" Type="Text" X="48" Y="15" Width="194" Height="30" Text="!(loc.InvalidUsernamePasswordDlgText)" /&gt;
      &lt;Control Id="Icon" Type="Icon" X="15" Y="15" Width="24" Height="24" ToolTip="!(loc.ErrorDlgErrorIconTooltip)" FixedSize="yes" IconSize="32" Text="!(loc.CancelDlgIcon)" /&gt;
      &lt;Control Id="Ok" Type="PushButton" X="105" Y="57" Width="50" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUIOK)"&gt;
        &lt;Publish Event="EndDialog" Value="Return"&gt;1&lt;/Publish&gt;
      &lt;/Control&gt;
    &lt;/Dialog&gt;
  
    &lt;Dialog Id="ServiceIdentityDlg" Title="!(loc.ServiceIdentityDlg_Title)" X="50" Y="50" Width="370" Height="270"&gt;
      &lt;Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="369" Height="44" Text="!(loc.SetupTypeDlgBannerBitmap)" Disabled="yes" /&gt;
      &lt;Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.ServiceIdentityDlgTitle)" /&gt;
      &lt;Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.ServiceIdentityDlgDescription)" /&gt;
      &lt;Control Id="BannerLine" Type="Line" X="0" Y="44" Width="373" Height="0" Disabled="yes" /&gt;
      &lt;Control Id="BottomLine" Disabled="yes" Height="1" Type="Line" Width="370" X="0" Y="234" /&gt;
      &lt;Control Id="UsernamePasswordText" Text="!(loc.UsernamePasswordText)" Type="Text" Width="330" Height="60" X="20" Y="60" /&gt;
      &lt;Control Id="UsernameLabel" Text="!(loc.UsernameLabel)" Type="Text" Width="100" Height="18" X="20" Y="127" /&gt;
      &lt;Control Id="ServiceIdentity" Type="Edit" X="130" Y="125" Width="120" Height="18" Property="CALCULATION.SERVICE.USERNAME" /&gt;
      &lt;Control Id="PasswordLabel" Text="!(loc.PasswordLabel)" Type="Text" Width="100" Height="18" X="20" Y="162" /&gt;
      &lt;Control Id="Password" Type="Edit" X="130" Y="160" Width="120" Height="18" Property="CALCULATION.SERVICE.PASSWORD" Password="yes" /&gt;
      &lt;Control Id="PasswordCheckLabel" Text="!(loc.ConfirmPasswordLabel)" Type="Text" Width="100" Height="18" X="20" Y="192" /&gt;
      &lt;Control Id="ConfirmPassword" Type="Edit" X="130" Y="190" Width="120" Height="18" Property="ConfirmPassword" Password="yes" /&gt;
      &lt;Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" /&gt;
      &lt;Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="!(loc.WixUINext)" Disabled="no" Default="yes" &gt;
        &lt;Publish Property="IsValidUser" Value="1"&gt;CALCULATION.SERVICE.USERNAME AND CALCULATION.SERVICE.PASSWORD AND CALCULATION.SERVICE.PASSWORD = ConfirmPassword&lt;/Publish&gt;
        &lt;Publish Property="IsValidUser"&gt;NOT CALCULATION.SERVICE.USERNAME OR NOT CALCULATION.SERVICE.PASSWORD OR CALCULATION.SERVICE.PASSWORD &amp;lt;&amp;gt; ConfirmPassword&lt;/Publish&gt;
        &lt;Publish Event="SpawnDialog" Value="InvalidUsernamePasswordDlg"&gt;NOT IsValidUser&lt;/Publish&gt;
      &lt;/Control&gt;
      &lt;Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Text="!(loc.WixUICancel)" Cancel="yes"&gt;
        &lt;Publish Event="SpawnDialog" Value="CancelDlg"&gt;1&lt;/Publish&gt;
      &lt;/Control&gt;
    &lt;/Dialog&gt;
  
    &lt;Property Id="ARPNOMODIFY" Value="1" /&gt;
  
  &lt;/UI&gt;
  &lt;UIRef Id="WixUI_Common" /&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>I trigger the install via a cmd file, which looks like...</p>
  
  <pre><code>msiexec.exe /i Ct.IIS.msi ^
  TARGET.INSTALLLOCATION="\\share\xxxz\east\" ^
  CALCULATION.SERVICE.USERNAME=".\xxx" ^
  CALCULATION.SERVICE.PASSWORD="xxx" ^
  /l* Ct.IIS.Install.log /q
  </code></pre>
  
  <p>Any ideas?</p>