[wix-users] Empty Folders

Edwin Castro egcastr at gmail.com
Wed Nov 11 16:48:05 PST 2015


George,

See the description of the Guid attribute in the Component documentation:

http://wixtoolset.org/documentation/manual/v3/xsd/wix/component.html

The important bit is the following:

"Generatable guids are supported only for components with a single file as
the component's keypath or no files and a registry value as the keypath."

Because the generated <Component/> only contains <CreateFolder/>, then the
keypath for the component is the component's Directory.

So the error message is trying to tell you that you cannot use
auto-generated guid for that component.

The WiX developers would need to explain why this specific scenario is not
supported for auto-generated guids.

I tried to make sense of Binder.cs and Uuid.cs to take a guess but it is
going over my head. I would guess something to do with the stability
(repeatability and consistency) of guid generation with just a directory
path as opposed to a directory+filename path (used for files) but I really
don't know how the difference in path affects the guid generation.

--
Edwin G. Castro


On Wed, Nov 11, 2015 at 4:16 PM, George Legge <george at haglis.co.uk> wrote:

> Hi,
>
> Sorry I meant to include the error when using the harvested folder -
>
> The Component/@Guid attribute's value '*' is not valid for this component
> because it does not meet the criteria for having an automatically generated
> guid. Components using a Directory as a KeyPath or containing
> ODBCDataSource
> child elements cannot use an automatically generated guid. Make sure your
> component doesn't have a Directory as the KeyPath and move any
> ODBCDataSource child elements to components with explicit component guids.
>
> I get this when trying to harvest empty folders.
>
> George.
>
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
> Of
> Edwin Castro
> Sent: 11 November 2015 23:12
> To: WiX Toolset Users Mailing List
> Subject: Re: [wix-users] Empty Folders
>
> On Wed, Nov 11, 2015 at 1:27 PM, George Legge <george at haglis.co.uk> wrote:
>
> > I know this subject has been raised many times but I am interested to
> > know why Windows Installer doesn't like creating empty folders when
> > its done via a Harvest, even using the KeepEmptyFolders parameter, but
> > creating them using the <CreateFolder /> element in a Component is fine ?
> >
>
> What do you mean by "Windows Installer doesn't like creating empty folders
> when its done via a Harvest, even using the KeepEmptyFolders parameter"?
>
> The Windows Installer creates folders as needed in order to install files
> in
> the File table associated with a selected component in the Component table.
> To create an empty folder you must associate the folder in the Directory
> table with a component in the Component table by using the CreateFolder
> table. The way this is done in WiX is to use <CreateFolder/> inside a
> <Component/>.
>
> Are you saying the Harvest with the KeepEmptyFolders parameter (this is
> done
> by heat.exe -ke) is generating a .wxs that does not have <CreateFolder/>
> elements inside of <Component/> elements for your empty folders?
>
> --
> Edwin G. Castro
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>



-- 
Edwin G. Castro


More information about the wix-users mailing list