0
votes

im trying to create a custom installer Setup, using wix-template. Everything works fine, except the use of the 'edit' control in a custom dialog.

Heres the code of the Dialog file:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI Id="InstallDlg_UI" >
<TextStyle Id="Tahoma_Regular" FaceName="Tahoma" Size="8" />
<Property Id="DefaultUIFont" Value="Tahoma_Regular" />
<Property Id="TEST" Value="test" Secure="yes"/>
<Dialog Id="InstallDlg" Width="320" Height="180" NoMinimize="yes" Title="RC Proxy Service" >
    <Control Id="CRMServerTxt" Type="Text" Width="80" Height="17" X="5" Y="5" Text="CRM-Server:"/>
    <Control Id="CRM" Type="Edit" Width="100" Height="17" X ="90" Y="5" Indirect="yes" Property="TEST"/>
    <Control Id="SQLServerTxt" Type="Text" Width="80" Height="17" X="5" Y="25" Text="SQL-Server:" />
    <Control Id="Install" Type="PushButton" X="150" Y="155" Width="80" Height="17" Text="Install"  />
    <Control Id="Cancel" Type="PushButton" X="235" Y="155" Width="80" Height="17" Text="Cancel"/>
  </Dialog>

  <InstallUISequence>
    <Show Dialog="InstallDlg" Before="ExecuteAction"/>
  </InstallUISequence>
</UI>

And this is the product.wxs file that references the dialog.

 <?xml version="1.0" encoding="UTF-8"?>
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="*" Name="TestInstaller" Language="1033" Version="1.0.0.0"   Manufacturer="test" UpgradeCode="b5c70750-4fdb-4ff1-8e0f-0bb8bcd47d9e">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
    <MajorUpgrade DowngradeErrorMessage="A newer version of TestInstaller is already installed." />
    <MediaTemplate />

    <Feature Id="ProductFeature" Title="TestSetup" Level="1">
      <ComponentGroupRef Id="ProductComponents" />
    </Feature>
    <UIRef Id="InstallDlg_UI"/>
    </Product>
  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLFOLDER" Name="TestSetup" />
      </Directory>
    </Directory>
  </Fragment>

  <Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">      
      <Component>
        <File Source="$(var.SetupSample.TargetPath)" />
      </Component>    
    </ComponentGroup>
  </Fragment>
</Wix>

Im always getting error code 2228 when i try to execute the msi file. Without the 'edit' control everything works.

Im using Visual Studio 2013 and the Wix-Toolset v3.9 R2.

Someone any ideas?

Thanks Andree

1
This code is correct, I added it to my installer and it works. I think the error is in another place.Marlos
@Marlos: Any idea where the error should come from. I added the product.wxs file to my example. Maybe any missing reference?shaft
Are you executing a custom action against SQL? Error code 2228 is "Database: [2]. Unknown table '[3]' in SQL query: [4]." msdn.microsoft.com/en-us/library/…Marlos
@Marlos: No i dont use any cutom action yet, and there is no database connection.shaft

1 Answers

0
votes

It seem to me that the problem is resolved. I have missed to add the basic dialogs that are needed for the setup. After adding the progress and the finished dialog all works fine.