summaryrefslogtreecommitdiffstats
path: root/PC/bdist_wininst
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2004-12-01 18:18:08 (GMT)
committerThomas Heller <theller@ctypes.org>2004-12-01 18:18:08 (GMT)
commit9cc5cb7c4b866f255c73185b2ec4648d532b9108 (patch)
tree7f1db103c1953fca772d2ad5518017cf79f37ed5 /PC/bdist_wininst
parentcdd6e4d753c6024e1e7503fa4b1f67928da35296 (diff)
downloadcpython-9cc5cb7c4b866f255c73185b2ec4648d532b9108.zip
cpython-9cc5cb7c4b866f255c73185b2ec4648d532b9108.tar.gz
cpython-9cc5cb7c4b866f255c73185b2ec4648d532b9108.tar.bz2
Running the pre-install or post-install script did not work when
Python was installed with the 'only for me' option. The registry key had a hardcoded '2.3' in it where the python version chosen for installation should be used instead. Will backport myself.
Diffstat (limited to 'PC/bdist_wininst')
-rw-r--r--PC/bdist_wininst/install.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c
index d268624..bd83294 100644
--- a/PC/bdist_wininst/install.c
+++ b/PC/bdist_wininst/install.c
@@ -611,12 +611,15 @@ PyMethodDef meth[] = {
static HINSTANCE LoadPythonDll(char *fname)
{
char fullpath[_MAX_PATH];
+ char subkey_name[80];
LONG size = sizeof(fullpath);
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\\%s.%s\\InstallPath",
+ py_major, py_minor);
+ if (ERROR_SUCCESS != RegQueryValue(HKEY_CURRENT_USER, subkey_name,
fullpath, &size))
return NULL;
strcat(fullpath, "\\");
@@ -1793,7 +1796,7 @@ InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
/* Strip the trailing backslash again */
python_dir[strlen(python_dir)-1] = '\0';
- CheckRootKey(hwnd);
+ CheckRootKey(hwnd);
if (!OpenLogfile(python_dir))
break;