Re: [WiX-users] Dynamically naming a database during its installation

2008-08-11 Thread Eitan Behar
Hi Chris,


If you can send me the bits, it will great, I prefer not to re-invent the
wheel.

Thanks in advance,

Eitan


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Christopher
Karper
Sent: Tuesday, August 12, 2008 6:04 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Dynamically naming a database during its
installation

I built an extension that uses SqlFormattedScript elements.   It's basically
just SqlScript, plus formatting.  I used the same design, up to and
including the table it stores into in the final MSI DB.  I just rename it
for my own purposes.   I then take advantage of the fact that SqlScript
elements just schedule sql for running in a deferred CA, and I load the
scripts in myself in a DTF CA, and schedule them the same way.   I also make
sure to load in the WixSqlExtension stuff, including it's CA's.

I did it at work, and if they're fine with me sharing that, then I'll be
happy to do so.  I would assume it wouldn't be included as part of the
official distro, since it's DTF dependent, not all native.  Worst case, you
could reimplement using this design, as it works like a champ for me.

Chris

On Mon, Aug 11, 2008 at 2:36 PM, Eitan Behar <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I am willing to write the CA. Some writing using DFT sounds cool. But, the
> only solution that comes to my mind is: loop through the Binary table,
> export every Sql script, do a find and replace, import the Sql script back
> to the database. My scripts are pretty long, and I don't want to paste
them
> into wix every time I change it. I prefer the approach, change script,
push
> red button "build and deploy".
>
> If you think about an easier way to custom action it, I will appreciate
it.
>
> Thanks,
>
> Eitan
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Christopher
> Karper
> Sent: Monday, August 11, 2008 8:10 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Dynamically naming a database during its
> installation - WiX VERSION 3.0.4318.0
>
> No, you're right, you can only assign explicit scripts.   By "load", I
> meant
> copy & paste.
>
> The two elements have different capabilities, and unfortunately for you,
> you're looking for one that's only available with SqlString.
>
> You either have to cut & paste your statements into the .wxs, or write
your
> own CA to do the work.
>
> Chris
>
> On Mon, Aug 11, 2008 at 9:31 AM, Eitan Behar <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > Please, can you expand a little more on how to load the scripts into a
> > sqlstring and use the properties?
> >
> > I only saw how to assign SqlString explicit scripts, and not reading the
> > scripts from a .sql file in the Binary table.
> >
> > Thanks in advance,
> >
> > Eitan
> >
> >
> >
> > On Fri, Aug 8, 2008 at 12:40 AM, Christopher Karper <
> > [EMAIL PROTECTED]> wrote:
> >
> > > There is not anything built in to Wix right now that will let you use
> > > variables in SqlScripts.   You can load them into SqlString elements
> and
> > > use
> > > the normal [property] syntax.
> > >
> > > You can build a CA that will do this as well, which is what I did.
> > >
> > > Good luck!
> > > Chris
> > >
> > > On Thu, Aug 7, 2008 at 5:01 PM, Nic Barden <[EMAIL PROTECTED]>
> wrote:
> > >
> > > > Sorry forgot to mention I am running the latest WiX version -
> > 3.0.4318.0.
> > > > And SQL 2005 if that makes any difference.
> > > >
> > > >
> > > >
> > > > Hi guys,
> > > >
> > > >
> > > >
> > > > I am trying to use the SqlDatabase and SqlScript elements to install
> a
> > > > database and run some scripts to generate stored procs and tables
> etc.
> > > >
> > > > What I would ideally like is the user to be able to specify the
> > database
> > > > name in the setup UI, and then use that within the scripts.
> > > >
> > > > The SqlDatabase element has a "Database" attribute which specifies
> the
> > > name
> > > > of the database to create, so obviously this can be a WiX variable
at
> > > > runtime.
> > > >
> > > > However, inside the sql scripts I need to reference the name of the
> > > > database
> > > > also.  I am u

Re: [WiX-users] Dynamically naming a database during its installation

2008-08-11 Thread Christopher Karper
I built an extension that uses SqlFormattedScript elements.   It's basically
just SqlScript, plus formatting.  I used the same design, up to and
including the table it stores into in the final MSI DB.  I just rename it
for my own purposes.   I then take advantage of the fact that SqlScript
elements just schedule sql for running in a deferred CA, and I load the
scripts in myself in a DTF CA, and schedule them the same way.   I also make
sure to load in the WixSqlExtension stuff, including it's CA's.

I did it at work, and if they're fine with me sharing that, then I'll be
happy to do so.  I would assume it wouldn't be included as part of the
official distro, since it's DTF dependent, not all native.  Worst case, you
could reimplement using this design, as it works like a champ for me.

Chris

On Mon, Aug 11, 2008 at 2:36 PM, Eitan Behar <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I am willing to write the CA. Some writing using DFT sounds cool. But, the
> only solution that comes to my mind is: loop through the Binary table,
> export every Sql script, do a find and replace, import the Sql script back
> to the database. My scripts are pretty long, and I don't want to paste them
> into wix every time I change it. I prefer the approach, change script, push
> red button "build and deploy".
>
> If you think about an easier way to custom action it, I will appreciate it.
>
> Thanks,
>
> Eitan
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Christopher
> Karper
> Sent: Monday, August 11, 2008 8:10 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Dynamically naming a database during its
> installation - WiX VERSION 3.0.4318.0
>
> No, you're right, you can only assign explicit scripts.   By "load", I
> meant
> copy & paste.
>
> The two elements have different capabilities, and unfortunately for you,
> you're looking for one that's only available with SqlString.
>
> You either have to cut & paste your statements into the .wxs, or write your
> own CA to do the work.
>
> Chris
>
> On Mon, Aug 11, 2008 at 9:31 AM, Eitan Behar <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > Please, can you expand a little more on how to load the scripts into a
> > sqlstring and use the properties?
> >
> > I only saw how to assign SqlString explicit scripts, and not reading the
> > scripts from a .sql file in the Binary table.
> >
> > Thanks in advance,
> >
> > Eitan
> >
> >
> >
> > On Fri, Aug 8, 2008 at 12:40 AM, Christopher Karper <
> > [EMAIL PROTECTED]> wrote:
> >
> > > There is not anything built in to Wix right now that will let you use
> > > variables in SqlScripts.   You can load them into SqlString elements
> and
> > > use
> > > the normal [property] syntax.
> > >
> > > You can build a CA that will do this as well, which is what I did.
> > >
> > > Good luck!
> > > Chris
> > >
> > > On Thu, Aug 7, 2008 at 5:01 PM, Nic Barden <[EMAIL PROTECTED]>
> wrote:
> > >
> > > > Sorry forgot to mention I am running the latest WiX version -
> > 3.0.4318.0.
> > > > And SQL 2005 if that makes any difference.
> > > >
> > > >
> > > >
> > > > Hi guys,
> > > >
> > > >
> > > >
> > > > I am trying to use the SqlDatabase and SqlScript elements to install
> a
> > > > database and run some scripts to generate stored procs and tables
> etc.
> > > >
> > > > What I would ideally like is the user to be able to specify the
> > database
> > > > name in the setup UI, and then use that within the scripts.
> > > >
> > > > The SqlDatabase element has a "Database" attribute which specifies
> the
> > > name
> > > > of the database to create, so obviously this can be a WiX variable at
> > > > runtime.
> > > >
> > > > However, inside the sql scripts I need to reference the name of the
> > > > database
> > > > also.  I am unsure whether it is possible to pass parameters into the
> > > > script
> > > > at run time?
> > > >
> > > >
> > > >
> > > > How would this task normally be achieved?  Do we have to hard code
> the
> > > > database name and then manually change it? :-(
> > > >
> > > >
> > > >
> > > > Thanks for your 

Re: [WiX-users] Dynamically naming a database during its installation

2008-08-11 Thread Eitan Behar
Hi,

I am willing to write the CA. Some writing using DFT sounds cool. But, the
only solution that comes to my mind is: loop through the Binary table,
export every Sql script, do a find and replace, import the Sql script back
to the database. My scripts are pretty long, and I don't want to paste them
into wix every time I change it. I prefer the approach, change script, push
red button "build and deploy".

If you think about an easier way to custom action it, I will appreciate it.

Thanks,

Eitan


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Christopher
Karper
Sent: Monday, August 11, 2008 8:10 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Dynamically naming a database during its
installation - WiX VERSION 3.0.4318.0

No, you're right, you can only assign explicit scripts.   By "load", I meant
copy & paste.

The two elements have different capabilities, and unfortunately for you,
you're looking for one that's only available with SqlString.

You either have to cut & paste your statements into the .wxs, or write your
own CA to do the work.

Chris

On Mon, Aug 11, 2008 at 9:31 AM, Eitan Behar <[EMAIL PROTECTED]> wrote:

> Hi,
>
> Please, can you expand a little more on how to load the scripts into a
> sqlstring and use the properties?
>
> I only saw how to assign SqlString explicit scripts, and not reading the
> scripts from a .sql file in the Binary table.
>
> Thanks in advance,
>
> Eitan
>
>
>
> On Fri, Aug 8, 2008 at 12:40 AM, Christopher Karper <
> [EMAIL PROTECTED]> wrote:
>
> > There is not anything built in to Wix right now that will let you use
> > variables in SqlScripts.   You can load them into SqlString elements and
> > use
> > the normal [property] syntax.
> >
> > You can build a CA that will do this as well, which is what I did.
> >
> > Good luck!
> > Chris
> >
> > On Thu, Aug 7, 2008 at 5:01 PM, Nic Barden <[EMAIL PROTECTED]> wrote:
> >
> > > Sorry forgot to mention I am running the latest WiX version -
> 3.0.4318.0.
> > > And SQL 2005 if that makes any difference.
> > >
> > >
> > >
> > > Hi guys,
> > >
> > >
> > >
> > > I am trying to use the SqlDatabase and SqlScript elements to install a
> > > database and run some scripts to generate stored procs and tables etc.
> > >
> > > What I would ideally like is the user to be able to specify the
> database
> > > name in the setup UI, and then use that within the scripts.
> > >
> > > The SqlDatabase element has a "Database" attribute which specifies the
> > name
> > > of the database to create, so obviously this can be a WiX variable at
> > > runtime.
> > >
> > > However, inside the sql scripts I need to reference the name of the
> > > database
> > > also.  I am unsure whether it is possible to pass parameters into the
> > > script
> > > at run time?
> > >
> > >
> > >
> > > How would this task normally be achieved?  Do we have to hard code the
> > > database name and then manually change it? :-(
> > >
> > >
> > >
> > > Thanks for your help!
> > >
> > >
> -
> > > This SF.Net email is sponsored by the Moblin Your Move Developer's
> > > challenge
> > > Build the coolest Linux based applications with Moblin SDK & win great
> > > prizes
> > > Grand prize is a trip for two to an Open Source event anywhere in the
> > world
> > > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > > ___
> > > WiX-users mailing list
> > > WiX-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wix-users
> > >
> >
-
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> > challenge
> > Build the coolest Linux based applications with Moblin SDK & win great
> > prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the
> world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > ___
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> 

Re: [WiX-users] Dynamically naming a database during its installation - WiX VERSION 3.0.4318.0

2008-08-11 Thread Christopher Karper
No, you're right, you can only assign explicit scripts.   By "load", I meant
copy & paste.

The two elements have different capabilities, and unfortunately for you,
you're looking for one that's only available with SqlString.

You either have to cut & paste your statements into the .wxs, or write your
own CA to do the work.

Chris

On Mon, Aug 11, 2008 at 9:31 AM, Eitan Behar <[EMAIL PROTECTED]> wrote:

> Hi,
>
> Please, can you expand a little more on how to load the scripts into a
> sqlstring and use the properties?
>
> I only saw how to assign SqlString explicit scripts, and not reading the
> scripts from a .sql file in the Binary table.
>
> Thanks in advance,
>
> Eitan
>
>
>
> On Fri, Aug 8, 2008 at 12:40 AM, Christopher Karper <
> [EMAIL PROTECTED]> wrote:
>
> > There is not anything built in to Wix right now that will let you use
> > variables in SqlScripts.   You can load them into SqlString elements and
> > use
> > the normal [property] syntax.
> >
> > You can build a CA that will do this as well, which is what I did.
> >
> > Good luck!
> > Chris
> >
> > On Thu, Aug 7, 2008 at 5:01 PM, Nic Barden <[EMAIL PROTECTED]> wrote:
> >
> > > Sorry forgot to mention I am running the latest WiX version -
> 3.0.4318.0.
> > > And SQL 2005 if that makes any difference.
> > >
> > >
> > >
> > > Hi guys,
> > >
> > >
> > >
> > > I am trying to use the SqlDatabase and SqlScript elements to install a
> > > database and run some scripts to generate stored procs and tables etc.
> > >
> > > What I would ideally like is the user to be able to specify the
> database
> > > name in the setup UI, and then use that within the scripts.
> > >
> > > The SqlDatabase element has a "Database" attribute which specifies the
> > name
> > > of the database to create, so obviously this can be a WiX variable at
> > > runtime.
> > >
> > > However, inside the sql scripts I need to reference the name of the
> > > database
> > > also.  I am unsure whether it is possible to pass parameters into the
> > > script
> > > at run time?
> > >
> > >
> > >
> > > How would this task normally be achieved?  Do we have to hard code the
> > > database name and then manually change it? :-(
> > >
> > >
> > >
> > > Thanks for your help!
> > >
> > >
> -
> > > This SF.Net email is sponsored by the Moblin Your Move Developer's
> > > challenge
> > > Build the coolest Linux based applications with Moblin SDK & win great
> > > prizes
> > > Grand prize is a trip for two to an Open Source event anywhere in the
> > world
> > > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > > ___
> > > WiX-users mailing list
> > > WiX-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wix-users
> > >
> > -
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> > challenge
> > Build the coolest Linux based applications with Moblin SDK & win great
> > prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the
> world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > ___
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Dynamically naming a database during its installation - WiX VERSION 3.0.4318.0

2008-08-11 Thread Eitan Behar
Hi,

Please, can you expand a little more on how to load the scripts into a
sqlstring and use the properties?

I only saw how to assign SqlString explicit scripts, and not reading the
scripts from a .sql file in the Binary table.

Thanks in advance,

Eitan



On Fri, Aug 8, 2008 at 12:40 AM, Christopher Karper <
[EMAIL PROTECTED]> wrote:

> There is not anything built in to Wix right now that will let you use
> variables in SqlScripts.   You can load them into SqlString elements and
> use
> the normal [property] syntax.
>
> You can build a CA that will do this as well, which is what I did.
>
> Good luck!
> Chris
>
> On Thu, Aug 7, 2008 at 5:01 PM, Nic Barden <[EMAIL PROTECTED]> wrote:
>
> > Sorry forgot to mention I am running the latest WiX version - 3.0.4318.0.
> > And SQL 2005 if that makes any difference.
> >
> >
> >
> > Hi guys,
> >
> >
> >
> > I am trying to use the SqlDatabase and SqlScript elements to install a
> > database and run some scripts to generate stored procs and tables etc.
> >
> > What I would ideally like is the user to be able to specify the database
> > name in the setup UI, and then use that within the scripts.
> >
> > The SqlDatabase element has a "Database" attribute which specifies the
> name
> > of the database to create, so obviously this can be a WiX variable at
> > runtime.
> >
> > However, inside the sql scripts I need to reference the name of the
> > database
> > also.  I am unsure whether it is possible to pass parameters into the
> > script
> > at run time?
> >
> >
> >
> > How would this task normally be achieved?  Do we have to hard code the
> > database name and then manually change it? :-(
> >
> >
> >
> > Thanks for your help!
> >
> > -
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> > challenge
> > Build the coolest Linux based applications with Moblin SDK & win great
> > prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the
> world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > ___
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Dynamically naming a database during its installation - WiX VERSION 3.0.4318.0

2008-08-07 Thread David Reed (SQL)
Nic, what I've been doing is using the sql:sqldatabase as an anchor outside a 
component with "master" as the target database (since it's guaranteed to be 
there and any authenticated user is guaranteed to be able to connect to it), 
then I use the sql:sqlstring to restore the database from a compressed backup. 
The AdventureWorks sample database installers for 2008 on CodePlex are built 
this way. We intend to publish the single wix project that builds all the 
samples installers One of These Days(tm).

Using sql:string this way for your CREATE DATABASE or other statements will 
allow you to format the strings using whatever variables you want at 
installation time...

The only downside is that sql:sqldatabase does not currently allow "continue on 
error" behavior if it's not inside a component for some reason... which means 
that you have to make sure that the instance target is up and running or you 
won't be able to install (or possibly not uninstall) if you use this approach 
and the connection can't be made.

Hence, I don't use a sql:sqlstring @ uninstall because I don't want to block an 
uninstall just because they uninstalled SQL Server first... or it's shutdown, 
etc. A custom action prompts the user to drop the database and executes a 
sqlcmd from a custom action instead to work around this limitation of 
sql:sqldatabase. [Yes, I filed a bug on it @ SF.]



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christopher 
Karper
Sent: Thursday, August 07, 2008 14:40
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Dynamically naming a database during its installation 
- WiX VERSION 3.0.4318.0

There is not anything built in to Wix right now that will let you use
variables in SqlScripts.   You can load them into SqlString elements and use
the normal [property] syntax.

You can build a CA that will do this as well, which is what I did.

Good luck!
Chris

On Thu, Aug 7, 2008 at 5:01 PM, Nic Barden <[EMAIL PROTECTED]> wrote:

> Sorry forgot to mention I am running the latest WiX version - 3.0.4318.0.
> And SQL 2005 if that makes any difference.
>
>
>
> Hi guys,
>
>
>
> I am trying to use the SqlDatabase and SqlScript elements to install a
> database and run some scripts to generate stored procs and tables etc.
>
> What I would ideally like is the user to be able to specify the database
> name in the setup UI, and then use that within the scripts.
>
> The SqlDatabase element has a "Database" attribute which specifies the name
> of the database to create, so obviously this can be a WiX variable at
> runtime.
>
> However, inside the sql scripts I need to reference the name of the
> database
> also.  I am unsure whether it is possible to pass parameters into the
> script
> at run time?
>
>
>
> How would this task normally be achieved?  Do we have to hard code the
> database name and then manually change it? :-(
>
>
>
> Thanks for your help!
>
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Dynamically naming a database during its installation - WiX VERSION 3.0.4318.0

2008-08-07 Thread Christopher Karper
There is not anything built in to Wix right now that will let you use
variables in SqlScripts.   You can load them into SqlString elements and use
the normal [property] syntax.

You can build a CA that will do this as well, which is what I did.

Good luck!
Chris

On Thu, Aug 7, 2008 at 5:01 PM, Nic Barden <[EMAIL PROTECTED]> wrote:

> Sorry forgot to mention I am running the latest WiX version - 3.0.4318.0.
> And SQL 2005 if that makes any difference.
>
>
>
> Hi guys,
>
>
>
> I am trying to use the SqlDatabase and SqlScript elements to install a
> database and run some scripts to generate stored procs and tables etc.
>
> What I would ideally like is the user to be able to specify the database
> name in the setup UI, and then use that within the scripts.
>
> The SqlDatabase element has a "Database" attribute which specifies the name
> of the database to create, so obviously this can be a WiX variable at
> runtime.
>
> However, inside the sql scripts I need to reference the name of the
> database
> also.  I am unsure whether it is possible to pass parameters into the
> script
> at run time?
>
>
>
> How would this task normally be achieved?  Do we have to hard code the
> database name and then manually change it? :-(
>
>
>
> Thanks for your help!
>
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Dynamically naming a database during its installation - WiX VERSION 3.0.4318.0

2008-08-07 Thread Nic Barden
Sorry forgot to mention I am running the latest WiX version - 3.0.4318.0.
And SQL 2005 if that makes any difference.

 

Hi guys,

 

I am trying to use the SqlDatabase and SqlScript elements to install a
database and run some scripts to generate stored procs and tables etc.

What I would ideally like is the user to be able to specify the database
name in the setup UI, and then use that within the scripts.

The SqlDatabase element has a "Database" attribute which specifies the name
of the database to create, so obviously this can be a WiX variable at
runtime.

However, inside the sql scripts I need to reference the name of the database
also.  I am unsure whether it is possible to pass parameters into the script
at run time?

 

How would this task normally be achieved?  Do we have to hard code the
database name and then manually change it? :-(

 

Thanks for your help!

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Dynamically naming a database during its installation

2008-08-07 Thread Nic Barden
Hi guys,

 

I am trying to use the SqlDatabase and SqlScript elements to install a
database and run some scripts to generate stored procs and tables etc.

What I would ideally like is the user to be able to specify the database
name in the setup UI, and then use that within the scripts.

The SqlDatabase element has a "Database" attribute which specifies the name
of the database to create, so obviously this can be a WiX variable at
runtime.

However, inside the sql scripts I need to reference the name of the database
also.  I am unsure whether it is possible to pass parameters into the script
at run time?

 

How would this task normally be achieved?  Do we have to hard code the
database name and then manually change it? :-(

 

Thanks for your help!

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users