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.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of W. Craig
Trader
Sent: Wednesday, July 11, 2007 8:50 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Converting Setup project to WiX 3.0 project (Custom
Actions)
Help!
I have a legacy .Net 2.0 application (C# plus some C++ COM controls)
that is currently deployed using a Visual Studio 2005 Setup project.
The Setup project uses a Custom Action written in C# (a subclass of
System.Configuration.Install.Installer) to install or upgrade a SQL
Server MSDE database (with backup and rollbacks) depending upon version
information in a table in the database. This works fine, but the Setup
project is fairly painful to maintain, and it can't be built unless
Visual Studio 2005 is installed on the build server.
We'd like the convert the whole thing to use WiX 3.0, but I'm having
trouble figuring out how to describe my Custom Action via WiX. I've
tried the WiX documentation, but everything still refers to WiX 2.0, and
only recommends C++ for Custom Actions. I've tried the WiX Wiki, but
again, everything refers to using C/C++ for implementing custom actions.
I've read Rob's blog where he says that using Managed Code for Custom
Actions is a Bad Thing and will not be supported.
While I'm sure that one answer would be to go through and implement all
of the database-specific logic in Transact-SQL that would be a
time-consuming project, given that the existing scripts are 13,500 lines
(creating a database) and 11,500 lines (upgrading existing databases)
and growing, and I'm not at all sure that the backup / rollback would
work with a SqlExtension (which the Wiki states shouldn't be used for
creating databases).
Another answer would be to incorporate all of the database creation /
upgrade logic into the application, but that has its own problems too --
I'd pretty much have to create an application launcher that was
responsible for upgrading the database and then launching the
application (or dying if the upgrade fails).
A third answer would be to launch my custom C# DLL with msiexec, but I
haven't found any examples that describe how to do this.
The best answer for me is one where I don't have to rewrite a bunch of
code that already works, but still allow me to use the WiX toolset going
forward. Any recommendations?
- Craig -
-------------------------------------------------------------------------
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