The guts of my code to do this looks like:
using (View binaryTable = session.Database.OpenView(ParameterizedBinaryQuery))
{
// Execute the parameterized query (id is substituted for '?')
// to get the binary record
using (Record idRecord = new Record(id))
{
binaryTable.Execute(idRecord);
}
using (Record binaryRow = binaryTable.Fetch())
{
if (binaryRow == null || binaryRow.IsNull(2))
{
throw new InstallerException("Binary Id " + id + " not
found in the Binary table.");
}
else
{
binaryRow.GetStream(2, filepath);
}
}
}
--
John Merryweather Cooper
Build & Install Engineer - ESA
Jack Henry & Associates, Inc.®
Shawnee Mission, KS 66227
Office: 913-341-3434 x791011
[email protected]
www.jackhenry.com
-----Original Message-----
From: TimM [mailto:[email protected]]
Sent: Tuesday, April 30, 2013 8:52 AM
To: [email protected]
Subject: Re: [WiX-users] Extract Binary file from MSI C++
Natalie, I have basically the same task where we have about 5 files within the
binary table that need to be extracted so that we can trigger a custom actions
that depends on all 5 files existing in the same folder.
So I would like to know if you have this working correctly and if so would you
be able to supply your solution?
Thanks.
--
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Extract-Binary-file-from-MSI-C-tp7582039p7585498.html
Sent from the wix-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get
100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead Download
for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are
intended
exclusively for the individual or entity to which it is addressed. The message,
together with any attachment, may contain confidential and/or privileged
information.
Any unauthorized review, use, printing, saving, copying, disclosure or
distribution
is strictly prohibited. If you have received this message in error, please
immediately advise the sender by reply email and delete all copies.
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users