By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,200 Members | 1,612 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,200 IT Pros & Developers. It's quick & easy.

Finding program/"component" version info

P: n/a
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?
Aug 9 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
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]
- mv*@spam.guard.caspershouse.com
"jeffc" <no****@nospam.comwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
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?


Aug 9 '07 #2

P: n/a
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" <no****@nospam.comwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
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?


Aug 9 '07 #3

P: n/a

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:O7**************@TK2MSFTNGP03.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.
Aug 9 '07 #4

P: n/a

Huh? This is a C# question.

"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions.comwrote in
message news:u3**************@TK2MSFTNGP04.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" <no****@nospam.comwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
>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?



Aug 9 '07 #5

P: n/a
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote
in message news:O7**************@TK2MSFTNGP03.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).
Aug 9 '07 #6

P: n/a

"Larry Smith" <no_spam@_nospam.comwrote in message
news:%2***************@TK2MSFTNGP06.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.
Aug 10 '07 #7

P: n/a
news:%2***************@TK2MSFTNGP06.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).

http://support.microsoft.com/dllhelp/
Aug 10 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.