See this thread
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Extract-Binarie
s-at-Install-Time-td2301189.html#a2314132


-----Original Message-----
From: Naim Kingston [mailto:naim.kings...@ancamotion.com] 
Sent: 12 January 2012 05:35
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Run exe in BinaryTable from custom action dll

Hey,

I have a 3rd party executable to detect some hardware, and since it's a
general purpose exe, not detecting the hardware isn't a condition that has
the exe return a failure (I guess, to be expected and completely fair).

So, in order to determine whether the hardware I'm looking for is present on
the system, I need to be able to catch the output that this exe outputs to
the standard output stream, so I'm trying to create a C# custom action dll to
run the exe using System.Diagnostics.Process and redirect its output to a
string where I can parse it to look for certain values to ensure the hardware
is present and correctly configured.

My problem is that the tool isn't going to be present on the system prior to
installation, and actually isn't needed by the final product, only to
determine the hardware state of the machine to make a decision on what to
install (which will actually be one of two other msi files, but running
multiple msi files is a problem for another day), so it's not going to be
installed with the rest of the product.

So, I've used the Binary tag to embed the exe into the installer, and I can
run it directly via custom action, but how do I run it from a dll custom
action? Can I somehow access it and run it while embedded? Or do I need to
write it out to the temp folder, run it, and then delete it?

And then, I need to set a variable or property so the data will be passed
back to the installer from the dll custom action.

But running the embedded exe from a custom action is what's giving me issues
right now. Has anyone done anything like this before? I've tried googling for
most of the day but haven't found anything particularly useful.

-Naim
-----------------------------------------------------------------------------
-
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to