diff options
author | Thomas Heller <theller@ctypes.org> | 2004-12-22 16:33:38 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2004-12-22 16:33:38 (GMT) |
commit | 625ba9511cfcb29fe0006c6a243329a3f3b34479 (patch) | |
tree | 93ccc1f03ce48026bf4c3676c51170d8b7b226cb /PC | |
parent | 5d1e86a9551626c5a0afe73ff0b207b8e8236a08 (diff) | |
download | cpython-625ba9511cfcb29fe0006c6a243329a3f3b34479.zip cpython-625ba9511cfcb29fe0006c6a243329a3f3b34479.tar.gz cpython-625ba9511cfcb29fe0006c6a243329a3f3b34479.tar.bz2 |
Backport of rev. 1.12 from the trunk.
Diffstat (limited to 'PC')
-rw-r--r-- | PC/bdist_wininst/install.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c index d268624..3d0eacd 100644 --- a/PC/bdist_wininst/install.c +++ b/PC/bdist_wininst/install.c @@ -612,11 +612,14 @@ static HINSTANCE LoadPythonDll(char *fname) { char fullpath[_MAX_PATH]; LONG size = sizeof(fullpath); + char subkeyname[80]; HINSTANCE h = LoadLibrary(fname); if (h) return h; - if (ERROR_SUCCESS != RegQueryValue(HKEY_CURRENT_USER, - "SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath", + wsprintf(subkey_name, + "SOFTWARE\\Python\\PythonCore\\%d.%d\\InstallPath", + py_major, py_minor); + if (ERROR_SUCCESS != RegQueryValue(HKEY_CURRENT_USER, subkey_name, fullpath, &size)) return NULL; strcat(fullpath, "\\"); |