I am maintaining the installer for our software, and so far I have a pretty
simple installer which copies the files, registrers the windows services and
creates a couple of shortcuts. No big deal.
Now I am beginning to get to the more complex stuff though, like maintaining a
database.
I have experimented a bit with this, and found a way to create the database and
run a script.
However, the way I understand it, this script will actually create the database
(through a sql user login with permissions to create a database):
<Component Id="CreateDB" Guid="*" DiskId="1" KeyPath="yes">
<Condition><![CDATA[(NOT Installed) AND (DATABASEAUTH=0)]]></Condition>
<Util:User Id="DBUser" Name="[DATABASEUSER]" Password="[DATABASEPWD]"/>
<!-- Create the database -->
<Sql:SqlDatabase Id="CreateDatabase"
Server="[DATABASESERVER]"
Database="[DATABASENAME]"
User="DBUser"
CreateOnInstall="yes"
ConfirmOverwrite="no">
<!-- Run the script to create tables -->
<Sql:SqlScript Id="CreateDB"
ExecuteOnInstall="yes"
BinaryKey="CreateDBScript"
Sequence="3"
ContinueOnError="no"/>
<!-- Run any updates -->
<Sql:SqlScript Id="UpdateDB"
ExecuteOnInstall="yes"
BinaryKey="UpdateDBScript"
Sequence="4"
ContinueOnError="no"/>
<!-- Insert static data -->
<Sql:SqlScript Id="InsertData"
ExecuteOnInstall="yes"
BinaryKey="InsertDataScript"
Sequence="4"
ContinueOnError="no"/>
</Sql:SqlDatabase>
</Component>
However, how would I formulate this if the database already exists? Can I only
handle that sort of thing in the actual script, or does the SqlWixExtension
give me any tools to work with?
Thanks,
Thomas Due
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users