On Tue, Dec 23, 2008 at 11:30 AM, Alexander Shevchuk <
alexander.shevc...@microsoft.com> wrote:

> Your custom action is type 51 (set property with a formatted text).  You
> need type 35 (set directory with a formatted text).  Review my first email
> for correct format.
>
> Alex
>
>
Actually, it turns out that that's unnecessary. With the registry key fix
you suggested, setting INSTALLDIR as a property worked fine, and no custom
actions or follow ups were needed.

So just for the record, here is a finally working version of my .wxs file,
which installs files based on a registry key:


<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi";>
 <Product Manufacturer="My Software Corp."
Id="2997E6AB-09BF-446B-A11F-EF40F546BD7C" Language="1033" Name="My Web
Service" Version="4.0.0.0">
  <Package Id="44F26F48-D493-4C7F-9A30-5496400A0AB0" Keywords="Installer"
Description="WebService for stuff" Comments="No Comment"
     Manufacturer="My Software Corp." InstallerVersion="200"
Languages="1033" Compressed="yes" SummaryCodepage="1252" />

   <Property Id="INSTALLDIR">
       <RegistrySearch Id='SharepointRegistry' Type='raw'
       Root='HKLM'
Key='SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\SharePoint' />
   </Property>

  <Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="INSTALLDIR">
      <Directory Id="INSTALLLOCATION" Name="ml">
        <Component Id="ProductComponent"
Guid="89C02981-D751-411F-9616-A202547F9D5F">
          <File Id="MySP_asmx" Name="MySPExt.asm"
LongName="MySPExtensions.asmx" Vital="yes" KeyPath="yes" DiskId="1" />
          <File Id="MySP_wsdl" Name="MySPwsdl.asp"
LongName="MySPExtensionswsdl.aspx" Vital="yes" DiskId="1" />
          <File Id="MySP_disco" Name="MySPdsco.asp"
LongName="MySPExtensionsdisco.aspx" Vital="yes" DiskId="1" />
        </Component>
      </Directory>
    </Directory>
  </Directory>

  <Feature Id="ProductFeature" Title="Feature Title" Level="1">
    <ComponentRef Id="ProductComponent" />
  </Feature>
  <Media Id="1" EmbedCab="yes" Cabinet="Product.cab" />
  <UI />
 </Product>
</Wix>

-----------------------------
I guess one thing that would have helped would be something in the log that
said that my registry key definition was wrong, or registry key not found,
or something like that.

Of course, that's an MSI issue, not a wix issue, but it sure would have
saved me time.

-- 
Regards,
 cf
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to