It is trying to use the directory as a fallback for your keypath. What you 
probably want in this component is for one of the registry keys to be the key 
path, then it won't try to use the directory for that.

Something like the following perhaps:

  <Component Id="foo" Guid="MyGUID" Directory="NotUsed">
    <RegistryKey Root="HKCU" Key="MyKey"
Action="createAndRemoveOnUninstall">
      <RegistryValue Name="MyValue" Action="write" Type="string"
Value="data" KeyPath="yes" />
    </RegistryKey>
  </Component>

--
Bryan

-----Original Message-----
From: Rodney Schuler [mailto:rschu...@gmail.com]
Sent: Thursday, February 25, 2010 2:36 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Pure registry component without a directory?

One feature of the .msi that I am trying to build is a large collection of
HKCU registry edits with no associated file.  (Wix-3)   The first thing I
tried using was components like:

  <Component Id="foo" Guid="MyGUID" >
    <RegistryKey Root="HKCU" Key="MyKey"
Action="createAndRemoveOnUninstall">
      <RegistryValue Name="MyValue" Action="write" Type="string"
Value="data" />
    </RegistryKey>
  </Component>

That makes errors like "error CNDL0010: The Component/@Directory attribute was 
not found; it is required.".  Hmm... This is just a gob of HKCU entries why do 
I need a directory?  How about I try some dummy directory:

  <Component Id="foo" Guid="MyGUID" Directory="NotUsed">
    <RegistryKey Root="HKCU" Key="MyKey"
Action="createAndRemoveOnUninstall">
      <RegistryValue Name="MyValue" Action="write" Type="string"
Value="data" />
    </RegistryKey>
  </Component>

That makes errors like "LGHT0204: ICE18: KeyPath for Component: 'foo' is
Directory: 'NotUsed'. The Directory/Component pair must be listed in the 
CreateFolders table.".  OK, fair enough, my dummy directory has to exist.
 Go grab a random folder from another feature in the product:

  <Component Id="foo" Guid="MyGUID" Directory="INSTALLDIR">
    <RegistryKey Root="HKCU" Key="MyKey"
Action="createAndRemoveOnUninstall">
      <RegistryValue Name="MyValue" Action="write" Type="string"
Value="data" />
    </RegistryKey>
  </Component>

hat makes errors like "LGHT0204: ICE18: KeyPath for Component: 'foo' is
Directory: 'INSTALLDIR'. The Directory/Component pair must be listed in the 
CreateFolders table.".  INSTALLDIR worked fine in that other feature with files 
what gives?

I have been using wix for less that a week, so I am easily confused.  How 
should I go about creating a feature that is just a gob of registry edits?

Thanks
-Rodney
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval Try the new software tools for 
yourself. Speed compiling, find bugs proactively, and fine-tune applications 
for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to