Lingappa, Attached are two files: PackageTree.cs, a custom task that generates an XML file containing a WiX fragment, and metadata.cs an auxilary class that handles the GUIDS. The code is still a bit rough around the edges, but works fine. A .metadata.xml file is created in every subdirectory to store the GUIDs that the task creates for each component. You will get warnings for every file the first time it runs, and then from then on just warnings when new files are added. You want something like this in your wixproj file to get it to run and create a fragment file called "tree.wxs" that contains components for each file ending in .txt in c:\some\directory. The generated file will automatically get compiled.
<PackageTree RootDirectory="c:\some\directory" OutputFileName="tree.wxs" MatchPattern="\.txt$"> <Output TaskParameter="OutputFileName" ItemName="Compile" /> </PackageTree> Cheers, John _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 20 July 2007 13:55 To: John Hall Subject: RE: [WiX-users] How to deploy all the files inside the folder rather than specifying each files Hi John, Thanks for your inputs. I appreciate if you could send me sample code that you have written. Thanks again, Regards, Lingappa _____ From: John Hall [mailto:[EMAIL PROTECTED] Sent: Friday, July 20, 2007 1:41 PM To: Sindhanur, Lingappa (Cognizant) Subject: RE: [WiX-users] How to deploy all the files inside the folder rather than specifying each files Hi, I need to specify contents of whole directory needs to be installed instead specifying each file names. Currently i am using like mentioned below: lt;Directory Id="AnyDirectory" Name="AnyDirectory" gt; lt;Component Id="AnyDirComp" Guid="FE698C55-B139-419e-B8A3-71ECFA2922D5" gt; lt;File Id="first.aspx" .... /gt; lt;File Id="second.aspx" .../gt; ... ... ... ... .... lt;/Component gt; lt;/Directory gt; I need to specify all the files. Problem any file is being added to the directory again i need to add the file in the wxs source. Is there a to specify the directory instead of files? Your help will be greatly appreciate. Thanks in advance. Lingappa , I needed to do something like this, so I wrote an msbuild custom task that automatically generates a .wxs file. It generates a GUID per component and stores that in an XML configuration file. When it finds a new file it generates a new GUID and updates its configuration file. It's not something that's too hard in C#. Cheers, John This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful.
Metadata.cs
Description: Metadata.cs
PackageTree.cs
Description: PackageTree.cs
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users