Announcement

Collapse
No announcement yet.

Programmically Read/Mofiy EXE Icon, Version Info

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Programmically Read/Mofiy EXE Icon, Version Info

    I'm writing an EXE wrapper that will combine various files

    My wrapper will read a source .EXE file and it needs to
    Code:
    - Extract the program Icon
    - Extract the Version Information
    
    THEN
    
    - It modifies the wrapper to reflect the .EXE program icon
    - Also updates the version information for the wrapper to reflect
      the .EXE file too
    This needs to be done programmically, and I can't use a resource
    compiler.

    Any ideas on how to do this?

    Thanks

    ------------------
    -Greg
    -Greg
    [email protected]
    MCP,MCSA,MCSE,MCSD

  • #2
    If you worry about NT/2000 only, all should be simple -
    BeginUpdateResource UpdateResource EndUpdateResource.
    I talk "should be", because I updated icons only (RT_ICONGROUP, then RT_ICON).

    ------------------
    E-MAIL: [email protected]

    Comment


    • #3
      Semen,

      No, it will be on windows 95, 98 and nt, win2k too.

      ------------------
      -Greg
      -Greg
      [email protected]
      MCP,MCSA,MCSE,MCSD

      Comment


      • #4
        Greg --
        If for any OS, simple is to update in-place only.I mean
        1) To read ExeFile into string variable , let's say a
        2) hLib = LoadLibraryEx (ExeFile, ByVal 0, %LOAD_LIBRARY_AS_DATAFILE)
        3) to find a handle of resource (hRes).
        4) Mid$(a, LockResource(hRes) - hLib + 2, SizeOfResource(hLib, hRes)) = ...




        ------------------
        E-MAIL: [email protected]

        Comment


        • #5
          Semen,

          I'm not sure I completly understand, I always thought that there
          where API's for this.

          What if I put a program icon in the EXE that is bigger then the
          only that already resides in the EXE (in byte size)?

          The same with the version information?


          ------------------
          -Greg
          -Greg
          [email protected]
          MCP,MCSA,MCSE,MCSD

          Comment


          • #6
            Gregery,

            Maybe my article at www.basicguru.com/zijlema/version.html contains some useful information on version retrieval?

            ------------------
            mailto:[email protected][email protected]</A>
            www.basicguru.com/zijlema/

            Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
            http://zijlema.basicguru.eu
            *** Opinions expressed here are not necessarily untrue ***

            Comment


            • #7
              Greg --
              Take a look http://codeguru.earthweb.com/misc/resources.html to have impression, what means to update resource in 9x

              ------------------
              E-MAIL: [email protected]

              Comment

              Working...
              X