Write Data to Binary File

Discussion in 'ASP General' started by Prabhat, Apr 29, 2006.

  1. Prabhat

    Prabhat Guest

    Hi Friends,

    I have one EXE file that customer need to download from my website. But I
    have one text file of Max 250 bytes of text in in that I want to append to
    the END of the Binary EXE file and give that for download to user. How can I
    do that. Please suggest. I think we need to go for some BinaryWrite kind of
    procedure using ADO Stream.

    Please suggest
    Prabhat
    Prabhat, Apr 29, 2006
    #1
    1. Advertising

  2. Prabhat

    Guest

    , Apr 29, 2006
    #2
    1. Advertising

  3. Prabhat

    Prabhat Guest

    <> wrote in message
    news:...
    > You could possibly use the document footer feature -
    >

    http://technet2.microsoft.com/WindowsServer/f/?en/Library/cd47396e-2149-461d
    -b6e7-bd1625f07fc11033.mspx
    >


    No. I want to append some Text (Content of some small text file having 2
    lines: Ex: "MyText.txt") in one of the EXE file (Binary File) Ex:
    "MyApplication.exe" using ASP, in webserver. How can I do that?
    Prabhat, Apr 29, 2006
    #3
  4. Your choices:
    1. Have IIS download the EXE file as a static file, and configure Footer for
    that file only
    2. Have an ASP page which reads the EXE file and BinaryWrite's the text file

    Of course, you can do whatever you want. If you insist on writing ASP code,
    go right ahead; most people prefer the Static File and Footer approach
    because it's just configuration - no code necessary.

    Aren't you corrupting the EXE by appending the text?

    --
    //David
    IIS
    http://blogs.msdn.com/David.Wang
    This posting is provided "AS IS" with no warranties, and confers no rights.
    //

    "Prabhat" <> wrote in message
    news:%...
    >
    > <> wrote in message
    > news:...
    >> You could possibly use the document footer feature -
    >>

    > http://technet2.microsoft.com/WindowsServer/f/?en/Library/cd47396e-2149-461d
    > -b6e7-bd1625f07fc11033.mspx
    >>

    >
    > No. I want to append some Text (Content of some small text file having 2
    > lines: Ex: "MyText.txt") in one of the EXE file (Binary File) Ex:
    > "MyApplication.exe" using ASP, in webserver. How can I do that?
    >
    >
    >
    David Wang [Msft], Apr 30, 2006
    #4
  5. Prabhat

    Prabhat Guest

    "David Wang [Msft]" <> wrote in message
    news:...
    > Your choices:
    > 1. Have IIS download the EXE file as a static file, and configure Footer

    for
    > that file only
    > 2. Have an ASP page which reads the EXE file and BinaryWrite's the text

    file
    >
    > Of course, you can do whatever you want. If you insist on writing ASP

    code,
    > go right ahead; most people prefer the Static File and Footer approach
    > because it's just configuration - no code necessary.
    >
    > Aren't you corrupting the EXE by appending the text?
    >
    > --
    > //David
    > IIS


    Hi David,

    Thanks for your suggestion. I did not know abt the Footer one. How can I do
    that in IIS 5.0 on windows 2000 Serv? Can we set the Footer only for one EXE
    ? Can you help me in that?

    Thanks
    Prabhat
    Prabhat, May 1, 2006
    #5
  6. This sounds like a one-off case, so just create a vdir which points to that
    ..EXE and set the vdir to append Footers to all resources within it.

    --
    //David
    IIS
    http://blogs.msdn.com/David.Wang
    This posting is provided "AS IS" with no warranties, and confers no rights.
    //

    "Prabhat" <> wrote in message
    news:%...
    >
    > "David Wang [Msft]" <> wrote in message
    > news:...
    >> Your choices:
    >> 1. Have IIS download the EXE file as a static file, and configure Footer

    > for
    >> that file only
    >> 2. Have an ASP page which reads the EXE file and BinaryWrite's the text

    > file
    >>
    >> Of course, you can do whatever you want. If you insist on writing ASP

    > code,
    >> go right ahead; most people prefer the Static File and Footer approach
    >> because it's just configuration - no code necessary.
    >>
    >> Aren't you corrupting the EXE by appending the text?
    >>
    >> --
    >> //David
    >> IIS

    >
    > Hi David,
    >
    > Thanks for your suggestion. I did not know abt the Footer one. How can I
    > do
    > that in IIS 5.0 on windows 2000 Serv? Can we set the Footer only for one
    > EXE
    > ? Can you help me in that?
    >
    > Thanks
    > Prabhat
    >
    >
    David Wang [Msft], May 2, 2006
    #6
  7. Prabhat

    Prabhat Guest

    "David Wang [Msft]" <> wrote in message
    news:...
    > This sounds like a one-off case, so just create a vdir which points to

    that
    > .EXE and set the vdir to append Footers to all resources within it.
    >

    Hi Thanks for your suggestion. But I have wrote code (in VB DLL) that will
    take path fore Source Text File and Source Binary File and Append the Text
    to the Binary File at END. I understand that I am modifying a Binary File -
    But I know that I am not currupting it.

    Thanks for your help
    Prabhat
    Prabhat, May 2, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    738
    Keith Thompson
    Feb 9, 2005
  2. Lambda
    Replies:
    1
    Views:
    686
    Michael DOUBEZ
    Jun 6, 2008
  3. Steve Holden
    Replies:
    0
    Views:
    391
    Steve Holden
    Dec 12, 2008
  4. scad
    Replies:
    4
    Views:
    950
    James Kanze
    May 28, 2009
  5. Billy Smith
    Replies:
    3
    Views:
    334
    Thomas 'PointedEars' Lahn
    Apr 23, 2006
Loading...

Share This Page