Hi,
Couldn't you just put the file in the binary table as well as install it, may 
be simpler overall than your approach.

Dave

-----Original Message-----
From: Niklas Söderberg [mailto:niklas.soderb...@gmail.com] 
Sent: 06 May 2010 08:40
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Read file content from CA

Thanks for your suggestions, but I guess I didn't emphasize enough that I need 
to read the file in an _immediate_ custom action, that is, I need to read it 
from the installation package before the file gets installed. I guess there's 
no easy way to do it, so the way I solved it was to temporarily extract the 
embedded cab-file and from there extract the file I need. A bit cumbersome, but 
it works.

Regards,
Niklas

On Tue, May 4, 2010 at 16:14, dB. <dbl...@dblock.org> wrote:

> There's a Win32_ReadFile immediate native (C++) CA in 
> http://msiext.codeplex.com. It was added in 1.2 which hasn't shipped 
> yet, but is stable - http://msiext.codeplex.com/releases/view/39468. 
> Note that it doesn't support encoding, so only works for ANSI files.
>
> If you're writing a managed CA yourself, well, just read the file with 
> StreamReader.ReadToEnd and then set a property with the contents read.
>
> Hope it helps,
>
> -dB.
>
> dB. @ dblock.org
> Moscow|Geneva|Seattle|New York
>
>
> -----Original Message-----
> From: Niklas Söderberg [mailto:niklas.soderb...@gmail.com]
> Sent: Tuesday, May 04, 2010 8:38 AM
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] Read file content from CA
>
> Is it possible to get the contents of a file from a custom action 
> (managed code)? I know I can get the contents of a binary item, but is 
> it possible to somehow do the same for a regular file included in the 
> installation package?
> I want to do this in an immediate custom action executed in the ui 
> sequence.
>
> I'm guessing no since I've searched and googled extensively, in vain, 
> but I'm still rather new to wix so perhaps I've missed something.
>
> Thanks,
> Niklas
>
> ----------------------------------------------------------------------
> -------- _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> ----------------------------------------------------------------------
> -------- _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
</pre>
<BR style="font-size:4px;">
<a href = "http://www.sdl.com";><img src="http://www.sdl.com/images/email 
logo_150dpi-01.png" alt="www.sdl.com" border="0"/></a>
<BR>
<font face="arial"  size="2" "><a href = "http://www.sdl.com"; 
style="color:005740; font-weight: bold">www.sdl.com</a>
<BR>
<BR>
<font face="arial"  size="1" color="#736F6E">
<b>SDL PLC confidential, all rights reserved.</b>
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.<BR>
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.<BR>
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.
</font>



------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to