Please, make sure you do. A Component can have only one KeyFile. Putting the KeyPath attribute on the component means that the directory of the component is the key path. Putting it on a file means the file is the key path. If you try to put it on multiple files inside of a component you'll get a build break because there can be only one.
Make sure you read the MSDN topics on file costing and major / minor upgrades and patches and 'Organizing Directories and Files Into Components'. Als Be sure that you really understand the implications of this choice. :-) Personally I use my homebuilt tool IsWiX to handle this for me. There is a radio selection with options for One To One and One to Many. This refers to the number of files per component. Behind the scenes One To Many helps you do the right thing by authoring special file types such as EXE's, DLL's, OCX, CHM's and FNT's as One To One. Everythin else gets authored as many files to one component with the component being key. One to One authors one component for each file with the file being key. Also note that a component can also only express files for one directory. In your example each sub directory requires it's own component. So if you have a tree of 50 directories you are going to have atleast 50 components. So based on all of this, it's obvious that you have much still to learn before being able to honestly say you understand the implications. No offense intended. ---------------------------------------- From: "Michael Scheepers" <mscheep...@tool-links.de> Sent: Wednesday, December 21, 2011 9:56 AM To: chr...@iswix.com, "General discussion for Windows Installer XML toolset." <wix-users@lists.sourceforge.net> Subject: Re: [WiX-users] files and components Well, I guess I understand the implications. That brings up my next question. Is it possible to define a component like <Component Id='xyz' Guid='some_guid'> <Directory Id='MyComponentFiles' FileSource='\path\to\source' KeyPath='yes'/> </Component> and have all subfolders and files added to the msi package? Or do I have to specify each file like <Component Id='xyz' Guid='some_guid'> <Directory Id='MyComponentFiles' FileSource="\path\to\source" KeyPath='yes'> <File id='file_1" name="file1.ext"/> ... <Directory Id='subdir_1'> <File id='file_50" name="file50.ext"/> </Directory> </Directory </Component> Regards Michel Am 21.12.2011 15:51, schrieb Christopher Painter: > Depends on what kind of files they are and how you plan on servicing them > (patching, upgrades ) Typically these are content type files such as web > content or help content. > > > But, yes, there are situations where this is acceptable provided that you > understand the implications. > > ---------------------------------------- > > From: "Michael Scheepers"<mscheep...@tool-links.de> > > Sent: Wednesday, December 21, 2011 8:44 AM > > To: wix-users@lists.sourceforge.net > > Subject: [WiX-users] files and components > > > Hi there, > > > I am very new to WiX and I ask me if it is possible (recommended) to > > define multiple files in one component? > > > Unfortunately I have to create a msi for about 4.500 files and in my > > opinion that might be 7 or 8 components to install. > > > So is it ok to combine a thousand files in one component (because they > > depend on each other)? > > > Regards > > Michel > > > ---------------------------------------------------------------------------- > -- > > Write once. Port to many. > > Get the SDK and tools to simplify cross-platform app development. Create > > new or port existing apps to sell to consumers worldwide. Explore the > > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > > http://p.sf.net/sfu/intel-appdev > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ---------------------------------------------------------------------------- -- > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users