Getting File (exe or dll) Versions

L

Lo Sheng

Hi,

I have dugged through the newsgroups to find a simple solution to find
the file version of a windows exe or dll file. The following approach
that uses Scripting object only works for 2k and XP:

import win32com.client
fso = win32com.client.Dispatch('Scripting.FileSystemObject')
fso.GetFileVersion('c:\\foo.dll')

On a Korean Windows 98SE, I get the following problem:

--- output log --Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\Python23\Lib\site-packages\win32com\client\dynamic.py",
line 489, in __getattr__
raise AttributeError, "%s.%s" % (self._username_, attr)
AttributeError: scripting.filesystemobject.GetFileVersion
--- end of output log ---

Does any one know what the root problem is, or what the workaround
should be?

Thanks in advance!

ls
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,278
Latest member
BuzzDefenderpro

Latest Threads

Top