forked from pEp.foundation/ImportFromEnigmail
parent
5f96ae12b6
commit
7d47294131
@ -1,18 +1,21 @@
|
||||
# coding=UTF-8
|
||||
import os
|
||||
from unix import *
|
||||
from _winreg import OpenKey, HKEY_LOCAL_MACHINE, QueryValueEx
|
||||
# from _winreg import OpenKey, HKEY_LOCAL_MACHINE, QueryValueEx
|
||||
|
||||
path = r"Software\Clients\Mail\Mozilla Thunderbird\InstallInfo"
|
||||
with OpenKey(HKEY_LOCAL_MACHINE, path) as key:
|
||||
keyval = QueryValueEx(key, "ReinstallCommand")
|
||||
regstring = keyval[0]
|
||||
# path = r"Software\Clients\Mail\Mozilla Thunderbird\InstallInfo"
|
||||
# with OpenKey(HKEY_LOCAL_MACHINE, path) as key:
|
||||
# keyval = QueryValueEx(key, "ReinstallCommand")
|
||||
# regstring = keyval[0]
|
||||
|
||||
path_start = regstring.find('\"')
|
||||
path_end = regstring.find('\"', path_start+1)
|
||||
path = regstring[path_start+1:path_end]
|
||||
# path_start = regstring.find('\"')
|
||||
# path_end = regstring.find('\"', path_start+1)
|
||||
# path = regstring[path_start+1:path_end]
|
||||
|
||||
uninstall_path = os.path.split(path)[0]
|
||||
thunderbird_base = os.path.dirname(uninstall_path)
|
||||
# uninstall_path = os.path.split(path)[0]
|
||||
# thunderbird_base = os.path.dirname(uninstall_path)
|
||||
|
||||
|
||||
thunderbird_base = os.path.join(os.environ['APPDATA'], 'Thunderbird')
|
||||
|
||||
per_user_directory = os.path.join(os.environ['LOCALAPPDATA'], '.pEp')
|
Loading…
Reference in new issue