Hello, I am completely new to Wix and i would like to have some advices from experimented users.
My scenario: We have each object of the database stored as a separated scripts in a tree structure like Create Scripts\Module\Tables Create Scripts\Module\Views Create Scripts\Module\StoredProcedures and we want to create an installer which will take all those files and install the database. FYI, this is actually a 'database' project in Visual Studio 2005 ( the basic one, not the one from Team System). So I created a Wix project which is able to install the database from this tree structure and the 229 sql scripts files it contains. I have created one Product.wsx ( originally from Eric Latendresse and fixed by Alexander Shevchuk in this user list, thanks you if you are reading this post :) <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util ="http://schemas.microsoft.com/wix/UtilExtension" xmlns:sql="http://schemas.microsoft.com/wix/SqlExtension"> <Product Id="1ae7d086-5997-4530-a969-e674ba7c73d8" Name="MyApp.Database.Installer" Language="1033" Version="1.0.0.0" Manufacturer="MyApp.Database.Installer" UpgradeCode="5765d61b-b8ed-417f-a3ab-85d57fdb61cf"> <Package InstallerVersion="200" Compressed="yes" /> <Media Id="1" Cabinet="MyApp.Database.Installer.cab" EmbedCab="yes" /> <util:User Id="MySQLUser" Name="login" Password="password"></util:User> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLLOCATION" Name="MyApp.Database.Installer"> <Component Id="MySqlComponent" Guid="C50999A0-02FD-42d5-9F65-7375318DD328"> <CreateFolder /> <sql:SqlDatabase Id="MySqlDatabase" Database="MyDatabase" Server="server" Instance="instance" CreateOnInstall="yes" DropOnUninstall="yes" User="MySQLUser" ContinueOnError="yes"> <!-- INSERT ALL 229 SCRIPT TAGS HERE --> </sql:SqlDatabase> </Component> </Directory> </Directory> </Directory> <!-- INSERT ALL 229 BINARY TAGS HERE --> <Feature Id="ProductFeature" Title="MyApp.Database.Installer" Level="1"> <ComponentRef Id='MySqlComponent' /> </Feature> </Product> </Wix> And, as mentioned in the above xml, I insert all the script tags and binary tags according to the templates : <sql:SqlScript Id='Script{2}' ExecuteOnInstall='yes' BinaryKey='{0}' Sequence='{2}' /> <Binary Id='{0}' SourceFile='{1}' /> where 0 is the filename, 1 is the filepath, 2 is a counter on the file added to the project. My questions are simple : - How do feel about this way to do ? - Do you see a way to improve it ? - is there any best practices that I should know about SQL database installer ? Please let me know if I should continue further this way or if I should do it another way. Thanks in advance for your advices Best regards, Christophe Laumond ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users