Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to check version info of an application programatically?

How to check version info of an application programatically?

Scheduled Pinned Locked Moved C#
csharptutorialquestionannouncement
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rockyl
    wrote on last edited by
    #1

    Hi, I would like to verify the version information of an installed application in a computer programatically (does any in built class in C# supports this). It would be great if you some one helps in this regard. Thanks in advance: Rakesh

    Rakesh

    M 1 Reply Last reply
    0
    • R rockyl

      Hi, I would like to verify the version information of an installed application in a computer programatically (does any in built class in C# supports this). It would be great if you some one helps in this regard. Thanks in advance: Rakesh

      Rakesh

      M Offline
      M Offline
      mikone
      wrote on last edited by
      #2

      Hi, this depends on the kind of application you want to check. I dont know any other standard than file versioning (for executables and dlls) which would allow to retrieve such information. If you want to check applications installed by windows installer there is a way to retrieve the information by using wmi if i remember right. All together there is no "in-built" class for such things and as far as i know you will have to create your own classes to retrieve these information.

      R 1 Reply Last reply
      0
      • M mikone

        Hi, this depends on the kind of application you want to check. I dont know any other standard than file versioning (for executables and dlls) which would allow to retrieve such information. If you want to check applications installed by windows installer there is a way to retrieve the information by using wmi if i remember right. All together there is no "in-built" class for such things and as far as i know you will have to create your own classes to retrieve these information.

        R Offline
        R Offline
        rockyl
        wrote on last edited by
        #3

        Thanks for responding, My application do not use Windows Installer, so as per you I need to write a class of my own. So I would like to know how can I access these version info in my class, can you be broad in this...

        Rakesh

        M M 2 Replies Last reply
        0
        • R rockyl

          Thanks for responding, My application do not use Windows Installer, so as per you I need to write a class of my own. So I would like to know how can I access these version info in my class, can you be broad in this...

          Rakesh

          M Offline
          M Offline
          mikone
          wrote on last edited by
          #4

          I've been googling for retrieving the "standard" product version info of a exe/dll and found a forum post pointing to this article. The third example describes how to retrieve the version info by using the windows api (unsafe code). It's a bit complex but pretty self-explanatory. let me know if you don't get it and good luck so far :) MSDN - C# Unsafe Code Tutorial

          1 Reply Last reply
          0
          • R rockyl

            Thanks for responding, My application do not use Windows Installer, so as per you I need to write a class of my own. So I would like to know how can I access these version info in my class, can you be broad in this...

            Rakesh

            M Offline
            M Offline
            mav northwind
            wrote on last edited by
            #5

            Hi! In this case you can use the AssemblyName.Version property. If you have the path to your assembly (doesn't matter if it's an exe or a dll), you can call AssemblyName.GetAssemblyName(pathToAssembly); to retrieve the AssemblyName instance.

            Regards, mav -- Black holes are the places where God divided by 0...

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups