Write Data to Binary File

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Prabhat

    Write Data to Binary File

    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


  • anilruia@gmail.com

    #2
    Re: Write Data to Binary File

    You could possibly use the document footer feature -


    Comment

    • Prabhat

      #3
      Re: Write Data to Binary File


      <anilruia@gmail .com> wrote in message
      news:1146327499 .583271.88710@j 33g2000cwa.goog legroups.com...[color=blue]
      > You could possibly use the document footer feature -
      >[/color]

      -b6e7-bd1625f07fc1103 3.mspx[color=blue]
      >[/color]

      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?



      Comment

      • David Wang [Msft]

        #4
        Re: Write Data to Binary File

        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

        This posting is provided "AS IS" with no warranties, and confers no rights.
        //

        "Prabhat" <not_a_mail@hot mail.com> wrote in message
        news:%239N5TA8a GHA.5000@TK2MSF TNGP05.phx.gbl. ..[color=blue]
        >
        > <anilruia@gmail .com> wrote in message
        > news:1146327499 .583271.88710@j 33g2000cwa.goog legroups.com...[color=green]
        >> You could possibly use the document footer feature -
        >>[/color]
        > http://technet2.microsoft.com/Window...396e-2149-461d
        > -b6e7-bd1625f07fc1103 3.mspx[color=green]
        >>[/color]
        >
        > 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?
        >
        >
        >[/color]


        Comment

        • Prabhat

          #5
          Re: Write Data to Binary File


          "David Wang [Msft]" <someone@online .microsoft.com> wrote in message
          news:usRL2jAbGH A.1192@TK2MSFTN GP04.phx.gbl...[color=blue]
          > Your choices:
          > 1. Have IIS download the EXE file as a static file, and configure Footer[/color]
          for[color=blue]
          > that file only
          > 2. Have an ASP page which reads the EXE file and BinaryWrite's the text[/color]
          file[color=blue]
          >
          > Of course, you can do whatever you want. If you insist on writing ASP[/color]
          code,[color=blue]
          > 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[/color]

          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


          Comment

          • David Wang [Msft]

            #6
            Re: Write Data to Binary File

            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

            This posting is provided "AS IS" with no warranties, and confers no rights.
            //

            "Prabhat" <not_a_mail@hot mail.com> wrote in message
            news:%23u4Y5WOb GHA.4116@TK2MSF TNGP05.phx.gbl. ..[color=blue]
            >
            > "David Wang [Msft]" <someone@online .microsoft.com> wrote in message
            > news:usRL2jAbGH A.1192@TK2MSFTN GP04.phx.gbl...[color=green]
            >> Your choices:
            >> 1. Have IIS download the EXE file as a static file, and configure Footer[/color]
            > for[color=green]
            >> that file only
            >> 2. Have an ASP page which reads the EXE file and BinaryWrite's the text[/color]
            > file[color=green]
            >>
            >> Of course, you can do whatever you want. If you insist on writing ASP[/color]
            > code,[color=green]
            >> 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[/color]
            >
            > 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
            >
            >[/color]


            Comment

            • Prabhat

              #7
              Re: Write Data to Binary File


              "David Wang [Msft]" <someone@online .microsoft.com> wrote in message
              news:OHFFENdbGH A.628@TK2MSFTNG P04.phx.gbl...[color=blue]
              > This sounds like a one-off case, so just create a vdir which points to[/color]
              that[color=blue]
              > .EXE and set the vdir to append Footers to all resources within it.
              >[/color]
              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


              Comment

              Working...