import time, datetime, re, subprocess, sys, os, win32net, win32api, win32con, win32netcon, win32security, pymysql, time, \
wmi, requests, ctypes, json
import schedule, shutil, datetime, time
import winreg, math
from glob import glob
import subprocess as sp
import traceback, re


def getFileVersion(file_name):
try:
info = win32api.GetFileVersionInfo(file_name, os.sep)
ms = info['FileVersionMS']
ls = info['FileVersionLS']
version = '%d.%d.%d.%d' % (win32api.HIWORD(ms), win32api.LOWORD(ms), win32api.HIWORD(ls), win32api.LOWORD(ls))
return version
except Exception as e:
return "None"


softwareVersion = getFileVersion("D:\Program Files (x86)\JD\dd_workbench\dd_workbench.exe")

print(softwareVersion)

相关文章:

  • 2021-05-17
  • 2021-06-27
  • 2021-07-30
  • 2021-07-10
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-15
  • 2021-05-03
  • 2022-12-23
  • 2021-12-24
  • 2021-08-03
相关资源
相似解决方案