My solution is to have the CA invoke a DLL, which in turn execs the .exe and 
interprets the return code.  Yes, it's more work, but it works cleanly, and the 
DLL can hook into the MSI API to write to logs etc.
 

-----Original Message-----
From: DONG LEE [mailto:dongl...@gmail.com] 
Sent: Sunday, March 01, 2009 5:58 PM
To: WiX-users@lists.sourceforge.net
Subject: [WiX-users] Interpreting Return Codes of Executable Custom Action 
(type 2)

Hello,

I have some questions regarding processing return codes of a custom action that 
runs an executable.
I have an exe file that I want to execute as a part of the installation 
process, but the complication is that the exit codes this file returns does not 
satisfy the type 2 custom action return code requirement. That is, it does not 
return 0 when it finishes successfully. And this executable is 3rd-party 
provided, so I can't do anything to the executable itself.

There were two solutions that I thought of. The first one was to save the file 
in msi file table, install the file in some folder, and then to have a vbscript 
to run the executable, process its return code, and if the file completes 
successfully, make it return 0 to the msi installation session.

Another is to store the file in binary table, have a stub dll extract the file 
from the database, execute it, and then have it process the return code like I 
mentioned above.

My questions are

1) Does anyone have cleaner and easier solution?
2) For my first solution, would there be any way for me to delete the 
executable after it is done running? I don't want to use dos commands to do 
that, and I was hoping that there would be some sort of wix support for this 
type of scenario.
3) Do you see any benefits to the second solution (use stub dll instead of
vbscript) compared to the first one?

Thanks!
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA 
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise 
-Strategies to boost innovation and cut costs with open source participation 
-Receive a $600 discount off the registration fee with the source code: SFAD 
http://p.sf.net/sfu/XcvMzF8H _______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to