Results 1 to 5 of 5

Thread: How to get an EXE file's version number

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 1999
    Posts
    17
    In NT4 (not sure about other OS's) when you right click on an EXE and look at it's properties, there is a version tab.
    Is there any way in VB to get that info ? Specificly version number ?

    Thanks.

    Joe Handal
    Workstation Engineer
    [email protected]

  2. #2
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ottawa,ON,Canada
    Posts
    217
    If you look up these APIs you find what you're looking for:

    GetFileVersionInfo
    GetFileVersionInfoSize
    VerQueryValue

    Be Warned, however, these are fairly complex API functions and require a lot of reading to use correctly, too much to put here.
    You can find info in MSDN, or at www.vbapi.com

    Good luck!

  3. #3
    Lively Member
    Join Date
    Nov 1999
    Posts
    98
    if you are talking about your own project's exe just use the App.Major and App.Minor properties to get the major and minor version numbers, respectively. enjoy.

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    Check out the Code Snippet I've posted on PlanetSourceCode that retrieve that information.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Dec 1999
    Posts
    17
    Thanks Surge, that was exactly what I needed.
    Joe Handal
    Workstation Engineer
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width