mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 07:28:39 +00:00
[Extractor] Add Finding Win 7z Path via Registry
This commit is contained in:
parent
a26c5eb56e
commit
72493e6af3
1 changed files with 11 additions and 0 deletions
|
@ -36,6 +36,17 @@ if windows_check():
|
||||||
'C:\\Program Files\\7-Zip\\7z.exe',
|
'C:\\Program Files\\7-Zip\\7z.exe',
|
||||||
'C:\\Program Files (x86)\\7-Zip\\7z.exe',
|
'C:\\Program Files (x86)\\7-Zip\\7z.exe',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
import _winreg
|
||||||
|
try:
|
||||||
|
hkey = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, "Software\\7-Zip")
|
||||||
|
except WindowsError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
win_7z_path = os.path.join(_winreg.QueryValueEx(hkey, "Path")[0], "7z.exe")
|
||||||
|
_winreg.CloseKey(hkey)
|
||||||
|
win_7z_exes.insert(1, win_7z_path)
|
||||||
|
|
||||||
switch_7z = "x -y"
|
switch_7z = "x -y"
|
||||||
# Future suport:
|
# Future suport:
|
||||||
# 7-zip cannot extract tar.* with single command.
|
# 7-zip cannot extract tar.* with single command.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue