import subprocess
import time
import win32gui
...
def initUI(self):
# create a process
exePath = "C:\\Windows\\system32\\calc.exe"
subprocess.Popen(exePath)
hwnd = win32gui.FindWindowEx(0, 0, "CalcFrame", "计算器")
time.sleep(0.05)
window = QWindow.fromWinId(hwnd)
self.createWindowContainer(window, self)
self.setGeometry(500, 500, 450, 400)
self.setWindowTitle('File dialog')
self.show()
...
Результат:
потерять exe'menu
[/g0]
Попробуйте SummaryInformation.GetProperty(PID_TITLE)
и SummaryInformation.GetProperty(PID_REVNUMBER)
и все другие имена полей на странице странице msilib docs
Вы можете получить версию продукта, используя:
from msilib import *
def GetMsiProperty(path ,property):
db = OpenDatabase(path, MSIDBOPEN_READONLY)
view = db.OpenView ("SELECT Value FROM Property WHERE Property='" + property + "'")
view.Execute(None)
result = view.Fetch()
#print dir(result)
return result.GetString(1)
msiVersion = GetMsiProperty(r'C:\path\to.msi' ,"ProductVersion")
Ваша версия python должна быть выше 2.5 для работы вышеприведенной функции.