Hi, I'm trying to add a file (a SQL Script) to the MSI, which needs to be read in a Custom-Action. Alas, I can't work out where I'm going wrong here - hence this post
I ran Heat.exe to generate DBUpgrade.wxs which I then included in an existing Wix Project: <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Fragment> <DirectoryRef Id="DBUpgradeFiles"> <Directory Id="dir497E2C96F49F427E4991595824ADE62B" Name="TLDBUFiles" /> </DirectoryRef> </Fragment> <Fragment> <ComponentGroup Id="DBUpgradeFilesGroup"> <Component Id="cmpDAE963F0CEAA66D73C9A892A37F0EE24" Directory="dir497E2C96F49F427E4991595824ADE62B" Guid="{5F8301B5-F6F5-4C89-BFA5-D0714B6F69A4}"> <File Id="filDC3EE54786E299048901E5A617BD79A6" KeyPath="yes" Source="$(var.SQLFilesDir)\SPS.sql" /> </Component> </ComponentGroup> </Fragment> </Wix> In the Custom-Action I then listed the Files table - but the file (SPS.sql) is not listed. CA- Code [CustomAction] public static ActionResult RunSQL(Session session) { session.Log(@"DatabaseUpgade - STARTS"); session.Log(@"Listing Files - STARTS"); var fileView = session.Database.OpenView("SELECT FileName FROM File"); fileView.Execute(null); foreach (Record fileRec in fileView) { session.Log("\t{0}", fileRec["FileName"]); } Q1) Where, within the MSI database can I find the file ? Q2) I do not want the SQL script file to be installed on the client computer, so is this the best approach - or is there a better method to achieve this. Q3) There are examples of reading data from the Binary table - but I can't see how these tables hang together... Any suggestions ? Thanks ***************************************************************************************************************************************************************************************** Comtec Group Ltd. Registered in England and Wales. Company Registration Number: 06566630. Comtec Group Ltd is the ultimate holding company of Comtec Europe Ltd, Comm-tec Solutions Inc. and ProEQ Ltd. This email and any attachments are strictly confidential and intended solely for the addressee. They may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, you must not copy this email or the attachments, or use them for any purpose or disclose their contents to any other person. To do so may be unlawful. If you have received this transmission in error, please notify us as soon as possible and delete the message and attachments from all places in your computer where they are stored. Although we have scanned this e-mail and any attachments for viruses, it is your responsibility to ensure that they are actually virus free. ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users