Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WinSCP: Support for 'for you only' installations & other bug fixes #40

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
WinSCP: Prioritise HKCU over HKLM (#3)
sam97 authored May 28, 2021
commit 5ca79d9ec9df95b0c8b822a299a4b56bf4a7814c
6 changes: 3 additions & 3 deletions WinSCP/winscp.py
Original file line number Diff line number Diff line change
@@ -283,9 +283,9 @@ def _exe_from_reg(self, reg_root):
return None

def _autodetect_official_installreg(self):
hklm = self._exe_from_reg(winreg.HKEY_LOCAL_MACHINE)
return (hklm if hklm is not None
else self._exe_from_reg(winreg.HKEY_CURRENT_USER))
hkcu = self._exe_from_reg(winreg.HKEY_CURRENT_USER)
return (hkcu if hkcu is not None
else self._exe_from_reg(winreg.HKEY_LOCAL_MACHINE))

def _autodetect_official_progfiles(self):
for hive in ('%PROGRAMFILES%', '%PROGRAMFILES(X86)%'):