Finding program/"component" version info

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

    #1

    Finding program/"component" version info

    Not sure exactly what my question is or what forum to ask on.

    I know how to get version info from a particular file.
    e.g.
    FileVersionInfo .GetVersionInfo (filePath)

    What I'd like to do is get version info for Microsoft "components " such as
    MDAC, DAO, MFC Runtime, etc. An "overall" level rather than specific file
    version. For example .NET - 1.0 or 2.0, MDAC 2.5 or 2.7, etc. Any way? Or
    better forum?


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Finding program/"component " version info

    Unless you know which files definitively define those components, you
    aren't going to be able to get it programatically . There is no versioning
    API that works on a "package" level like that.

    The closest thing I can think of to do this would be to have a list of
    files which are distributed with those packages, and check the file versions
    for each of them. If they match that list of files (and their versions)
    then you have that version of that package.

    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m


    "jeffc" <nospam@nospam. comwrote in message
    news:%239%23WmC p2HHA.1204@TK2M SFTNGP03.phx.gb l...
    Not sure exactly what my question is or what forum to ask on.
    >
    I know how to get version info from a particular file.
    e.g.
    FileVersionInfo .GetVersionInfo (filePath)
    >
    What I'd like to do is get version info for Microsoft "components " such as
    MDAC, DAO, MFC Runtime, etc. An "overall" level rather than specific file
    version. For example .NET - 1.0 or 2.0, MDAC 2.5 or 2.7, etc. Any way?
    Or better forum?
    >
    >

    Comment

    • Ignacio Machin \( .NET/ C# MVP \)

      #3
      Re: Finding program/&quot;component &quot; version info

      Hi,

      I do not think this is the correct group, We could tell you how to get the
      version info of a .net assembly. very easily :)

      You might get a better answer in one of the C++ NGs


      "jeffc" <nospam@nospam. comwrote in message
      news:%239%23WmC p2HHA.1204@TK2M SFTNGP03.phx.gb l...
      Not sure exactly what my question is or what forum to ask on.
      >
      I know how to get version info from a particular file.
      e.g.
      FileVersionInfo .GetVersionInfo (filePath)
      >
      What I'd like to do is get version info for Microsoft "components " such as
      MDAC, DAO, MFC Runtime, etc. An "overall" level rather than specific file
      version. For example .NET - 1.0 or 2.0, MDAC 2.5 or 2.7, etc. Any way?
      Or better forum?
      >
      >

      Comment

      • jeffc

        #4
        Re: Finding program/&quot;component &quot; version info


        "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c omwrote in
        message news:O7vfuKp2HH A.3760@TK2MSFTN GP03.phx.gbl...
        Unless you know which files definitively define those components, you
        aren't going to be able to get it programatically . There is no versioning
        API that works on a "package" level like that.
        >
        The closest thing I can think of to do this would be to have a list of
        files which are distributed with those packages, and check the file
        versions for each of them. If they match that list of files (and their
        versions) then you have that version of that package.
        That's what I was afraid of, thanks.


        Comment

        • jeffc

          #5
          Re: Finding program/&quot;component &quot; version info


          Huh? This is a C# question.

          "Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions .comwrote in
          message news:u3zSTpp2HH A.1184@TK2MSFTN GP04.phx.gbl...
          >
          I do not think this is the correct group, We could tell you how to get the
          version info of a .net assembly. very easily :)
          >
          You might get a better answer in one of the C++ NGs
          >
          >
          "jeffc" <nospam@nospam. comwrote in message
          news:%239%23WmC p2HHA.1204@TK2M SFTNGP03.phx.gb l...
          >Not sure exactly what my question is or what forum to ask on.
          >>
          >I know how to get version info from a particular file.
          >e.g.
          >FileVersionInf o.GetVersionInf o(filePath)
          >>
          >What I'd like to do is get version info for Microsoft "components " such
          >as MDAC, DAO, MFC Runtime, etc. An "overall" level rather than specific
          >file version. For example .NET - 1.0 or 2.0, MDAC 2.5 or 2.7, etc. Any
          >way? Or better forum?
          >>
          >>
          >
          >

          Comment

          • Larry Smith

            #6
            Re: Finding program/&quot;component &quot; version info

            "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c omwrote
            in message news:O7vfuKp2HH A.3760@TK2MSFTN GP03.phx.gbl...
            > Unless you know which files definitively define those components, you
            >aren't going to be able to get it programatically . There is no
            >versioning API that works on a "package" level like that.
            >>
            > The closest thing I can think of to do this would be to have a list of
            >files which are distributed with those packages, and check the file
            >versions for each of them. If they match that list of files (and their
            >versions) then you have that version of that package.
            >
            That's what I was afraid of, thanks.
            That's not entirely accurate in my experience (though you may have to resort
            to it depending on the component). .There's no offical API that applies to
            all "components " but each component will often (usually) have a way of
            checking. It may rely on an official technique such as MSI or even (often)
            an official registry key but in some cases the technique may be crude or
            even unreliable (possibly not compatible with future releases). For
            mainstream components however there are usually ways that are reliable in
            practice (for MDAC for instance, see here:
            http://support.microsoft.com/kb/301202 - MSFT acknowledges it may not be the
            most reliable way but it likely is). The story runs deeper however since
            other issues can come into play. For instance, you may simply be able to
            check the version of Windows at runtime. Some components are pre-installed
            with certain versions of the OS for instance and I even have a MSFT link
            somewhere for this (I'll try to dig it up for you). Even if they are
            pre-installed however (meaning that you can just check the version of
            Windows you're interested in and it should be installed in theory), they may
            not be Windows protected files so some other poorly written install app
            could have overwritten them with earlier versions (or perhaps it can be
            officialy disabled using Windows itself). Also consider that you may be able
            to simply ship and install a component's redistribtable which should be
            robust in the presence of earlier versions (you should check this). You
            really need to research the subject in general but ultimately you'll have to
            check each individual component to see what MSFT officially says about it
            (which isn't always easy to track down).


            Comment

            • jeffc

              #7
              Re: Finding program/&quot;component &quot; version info


              "Larry Smith" <no_spam@_nospa m.comwrote in message
              news:%23OfUB$p2 HHA.484@TK2MSFT NGP06.phx.gbl.. .
              For instance, you may simply be able to check the version of Windows at
              runtime. Some components are pre-installed with certain versions of the OS
              for instance and I even have a MSFT link somewhere for this (I'll try to
              dig it up for you).
              That doesn't seem like the best option for us because of the stuff our app
              installs. We include merge modules for all kinds of Microsoft components,
              so I'd like a way to determine what's there after we install (after the
              customer might have patched our app or botched installs of multiple versions
              of our app.)

              Thanks for your reply, that was helpful.


              Comment

              • Larry Smith

                #8
                Re: Finding program/&quot;component &quot; version info

                news:%23OfUB$p2 HHA.484@TK2MSFT NGP06.phx.gbl.. .
                >For instance, you may simply be able to check the version of Windows at
                >runtime. Some components are pre-installed with certain versions of the
                >OS for instance and I even have a MSFT link somewhere for this (I'll try
                >to dig it up for you).
                >
                That doesn't seem like the best option for us because of the stuff our app
                installs. We include merge modules for all kinds of Microsoft components,
                so I'd like a way to determine what's there after we install (after the
                customer might have patched our app or botched installs of multiple
                versions of our app.)
                >
                Thanks for your reply, that was helpful.
                You know your app best of course. This link might be useful anyway (note
                that it's not confined to just DLLs in spite of the misleading name).




                Comment

                Working...