The recommendation is that each component contains a single file. That sidesteps the problems around adding and removing files from a component, and about key path detection. There are a few cases (e.g. installing multi-file assemblies) where it's required that you put multiple files in the same component.
If you were to keep all these files in a single component, you'd have to put any additional files for a later release into a separate component so that you don't break the rule about adding files to a component. (Because all the files from a single component are installed to a single directory, you actually need one extra component for each directory that contains new files.) You don't need to add components with a condition. You simply need to add the new components to the appropriate feature - Windows Installer's MigrateFeatureStates action will then take care of selecting the appropriate features on an upgrade. You can freely add and remove components from a feature in a major upgrade; in a minor upgrade your choices are more limited and you have to add a child feature that follows the parent feature's state. -- Mike Dimmick -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anthony Wieser Sent: 18 May 2007 16:26 To: wix-users@lists.sourceforge.net Subject: [WiX-users] Defining Installer Components;what is best practice for a large set of sample files? Onto my second WiX conversion, and yet another set of questions arises. I have a program that has a sample project distributed with it. The sample project consists of two folders each containing more folders and a set of about 10 files, for a total of about 100 files. Reading through the Windows Installer recommendations here: http://msdn2.microsoft.com/en-us/library/aa368269.aspx It appears that this case falls under case 6, which implies that I should put all of my files in each folder in a group. By doing this, I presumably install the set if the folder exists or not, which isn't too terrible, and as it says, this will improve performance. However, now when I come to do a major upgrade, I now have a problem if I want to add any files, do I need to create a new component ID? If so, doesn't the key path still match, and therefore the component won't be installed? And if that's the case, it appears that I need to cost the installation of each file separately, create a GUID for each file, and install them all, right? Finally, just to make it painfully obvious what I need to do, if I want to only install files if they don't already exist, I also need to add search for each file, and then conditionally add the component with a condition, if the file is found. Have I correctly understood how this all works? Anthony Wieser Wieser Software Ltd ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users