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))

  

posted @ 2018-03-19 13:41  jacky_zhao  阅读(197)  评论(0编辑  收藏  举报