Accessing Binary stream data

7 messages Options
Embed this post
Permalink
Tom Crozier

Accessing Binary stream data

Reply Threaded More More options
Print post
Permalink
Hi all -

How can I access the data stored in a binary stream inside a custom action?

For example if I wanted to have notepad display the contents of a ReadMe.txt file that was added to the installer as a binary.

    <Binary Id="ReadMe" SourceFile="ReadMe.txt" />

    <CustomAction Id="ShowReadMe"
                  ExeCommand="[SystemFolder]notepad.exe <ReadMe>"
                  Return="asyncNoWait" />

    <InstallExecuteSequence>
      <Custom Action="ShowReadMe" After="InstallFinalize">Not Installed</Custom>
    </InstallExecuteSequence>

Thanks - TopCat
------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Brian Rogers

Re: Accessing Binary stream data

Reply Threaded More More options
Print post
Permalink
Hey Tom,

Your question prompted a blog. I was going to write it all in the email but
I have seen this posed several times. I am sure, if you haven't already, you
could do some digging and find the answer. There are custom actions in the
WiX code base that do what you have asked as well.

Here is the blog post:
http://icumove.spaces.live.com/blog/cns!FB93073C6534B681!561.entry

Happy coding,

Brian Rogers
"Intelligence removes complexity." - Me
http://icumove.spaces.live.com


On Fri, Jun 19, 2009 at 1:09 PM, Tom Crozier <[hidden email]> wrote:

> Hi all -
>
> How can I access the data stored in a binary stream inside a custom action?
>
> For example if I wanted to have notepad display the contents of a
> ReadMe.txt file that was added to the installer as a binary.
>
>    <Binary Id="ReadMe" SourceFile="ReadMe.txt" />
>
>    <CustomAction Id="ShowReadMe"
>                  ExeCommand="[SystemFolder]notepad.exe <ReadMe>"
>                  Return="asyncNoWait" />
>
>    <InstallExecuteSequence>
>      <Custom Action="ShowReadMe" After="InstallFinalize">Not
> Installed</Custom>
>    </InstallExecuteSequence>
>
> Thanks - TopCat
>
> ------------------------------------------------------------------------------
> Are you an open source citizen? Join us for the Open Source Bridge
> conference!
> Portland, OR, June 17-19. Two days of sessions, one day of unconference:
> $250.
> Need another reason to go? 24-hour hacker lounge. Register today!
>
> http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
> _______________________________________________
> WiX-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Leo ...

condition for install state of shared component across MSIs

Reply Threaded More More options
Print post
Permalink
Given two MSIs that have a shared component (same component GUIDs), how
could I condition a custom action based on the install state of the shared
component?  If the component is already installed by one MSI, when
installing the second MSI, the condition in the second MSI should evaluate
to true that the shared component is already installed.  Thx!


------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Wilson, Phil

Re: condition for install state of shared component across MSIs

Reply Threaded More More options
Print post
Permalink
?Componentname=3 might work, installed state of the component.  

http://msdn.microsoft.com/en-us/library/aa368012(VS.85).aspx   

Phil Wilson


-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Wednesday, June 24, 2009 12:05 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] condition for install state of shared component across MSIs

Given two MSIs that have a shared component (same component GUIDs), how
could I condition a custom action based on the install state of the shared
component?  If the component is already installed by one MSI, when
installing the second MSI, the condition in the second MSI should evaluate
to true that the shared component is already installed.  Thx!


------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Bob Arnson-6

Re: condition for install state of shared component across MSIs

Reply Threaded More More options
Print post
Permalink
Wilson, Phil wrote:
> ?Componentname=3 might work, installed state of the component.  
>  

Unfortunately, it doesn't look beyond "installed for this product."

--
sig://boB
http://joyofsetup.com/



------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Tony Juricic

Versioning interop assemblies for patching

Reply Threaded More More options
Print post
Permalink
In reply to this post by Brian Rogers
In this particular case I am not interested in setting Company Name and version number for my interop assemblies (that is, files generated using tlbimp) just so that the name is not an empty string and that the version is not 1.0.0.0.

In order to have un-installable patches I need assembly file version numbers to change whenever the code changes.

How are other developers handling this problem? Are you just praying that you never have to patch interop assembly or have you settled for solution as explained here:

http://blogs.msdn.com/ianhu/archive/2005/06/16/429903.aspx

I there any better, newer solution?

As a matter of fact, I could not get the solution described at the blog link above to work because ilasm.exe from MS SDKs just won't run without fusion.dll. I have a bunch of fusion dlls installed in SxS (a new Hell after DLL Hell) but, really, does anybody in this century even run ilasm.exe anymore? If you do, please help!

TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Heath Stewart-2

Re: Versioning interop assemblies for patching

Reply Threaded More More options
Print post
Permalink
tlbimp.exe does allow you to set the assembly version using the /asmversion
option which also sets the file version. Note that it's the file version
that matters, though - not the assembly or product version. During link, you
won't need to pass -fv to light.exe since the assembly version changes. Ship
a publisher policy assembly in the GAC to automatically update bindings to
the new version as documented in the .NET Framework SDK at
http://msdn.microsoft.com/en-us/library/dz32563a.aspx.

On Thu, Jun 25, 2009 at 4:54 PM, Tony Juricic <[hidden email]>wrote:

> In this particular case I am not interested in setting Company Name and
> version number for my interop assemblies (that is, files generated using
> tlbimp) just so that the name is not an empty string and that the version is
> not 1.0.0.0.
>
> In order to have un-installable patches I need assembly file version
> numbers to change whenever the code changes.
>
> How are other developers handling this problem? Are you just praying that
> you never have to patch interop assembly or have you settled for solution as
> explained here:
>
> http://blogs.msdn.com/ianhu/archive/2005/06/16/429903.aspx
>
> I there any better, newer solution?
>
> As a matter of fact, I could not get the solution described at the blog
> link above to work because ilasm.exe from MS SDKs just won't run without
> fusion.dll. I have a bunch of fusion dlls installed in SxS (a new Hell after
> DLL Hell) but, really, does anybody in this century even run ilasm.exe
> anymore? If you do, please help!
>
> TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS:
> TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member
> NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading
> software and subscription company, and TradeStation Europe Limited, a United
> Kingdom, FSA-authorized introducing brokerage firm. None of these companies
> provides trading or investment advice, recommendations or endorsements of
> any kind. The information transmitted is intended only for the person or
> entity to which it is addressed and may contain confidential and/or
> privileged material. Any review, retransmission, dissemination or other use
> of, or taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material from any
> computer.
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> WiX-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wix-users
>



--
Heath Stewart
Deployment Technologies Team, Microsoft
http://blogs.msdn.com/heaths
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users