python使用windows註冊表

sapphire_info = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,r"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GenArts Sapphire Plug-ins for OFX_is1")
sapphire_info_list ,type = _winreg.QueryValueEx(sapphire_info,'DisplayName')
sapphire_version = sapphire_info_list[8:17] + sapphire_info_list[25:30]
self.tableWidget_Plugin.setItem(4, 0, QTableWidgetItem(sapphire_version))
sapphire_path = 'C:/Program Files/GenArts/SapphireOFX'.replace('/','\\')
self.tableWidget_Plugin.setItem(4, 2, QTableWidgetItem(sapphire_path))
相關文章
相關標籤/搜索