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

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top