python获取dll和exe文件版本号...
时间:2010-08-19 来源:windless0530
import win32api def getFileVersion(file_name): info = win32api.GetFileVersionInfo(file_name, os.sep) ms = info['FileVersionMS'] ls = info['FileVersionLS'] version = '%d.%d.%d.%04d' % (win32api.HIWORD(ms), win32api.LOWORD(ms), win32api.HIWORD(ls), win32api.LOWORD(ls)) return version
相关阅读 更多 +