> -----Original Message-----
> From: W. Craig Trader [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 12, 2007 12:36 PM
> To: John Vottero
> Cc: wix-users@lists.sourceforge.net
> Subject: Re: [WiX-users] Converting Setup project to WiX 3.0 project
> (Custom Actions)
> 
> John Vottero wrote:
> >
> > It would be very easy to write a console app that calls the C#
> > Installer based code.  Once you have that, use the WiX CAQuietExec
> > custom action to run the console app.
> >
> >
> >
[snip] 
> I'm thinking that I need to use the InstallUtil.exe console-app to run
> my code (since the code expects to be run that way for the old VS
Setup
> project).  Do you have any explicit examples (or pointers to examples)
> of how to use the QAQuietExec custom action?  I'm still pretty new to
> WiX...
> 

It's basically a two step process, set a property with the value of the
command line like this:

                <CustomAction 
                        Id="SetCreateDB" 
                        Property="CreateDB"
                        Value="&quot;[#JAMSDBAEXE]&quot;
INSTALL/UI=[UILevel]"/>

And then execute that command line with CAQuietExec like this:

                <CustomAction 
                        Id="CreateDB" 
                        BinaryKey="wixca" 
                        DllEntry="CAQuietExec" 
                        Execute="deferred" 
                        Impersonate="yes" 
                        Return="check"/>

You'll also have to schedule those two custom actions in the
<InstallExecuteSequence>

The hard part is getting the "Value" right in the first step.
[#JAMSDBAEXE] resolves to the full path of an executable that we just
installed.  I'm not sure how you get the full path to InstallUtil, I
think with <FileSearch>.

Also, you've mentioned rolling back if the DB update fails, I'm not sure
if that's going to work or not.  We treat DB updates as something that
happens *after* the installation.  If our DB update fails, the DB
updates rollback but, the product install doesn't.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to