+
+
+ (* -------------------------------------------------------------- *)
+ (* And now where to put the system DLLs *)
+
+ sysInstall := False;
+
+ (* Check if Python has a regkey in HKLM, if so it installed the DLLs in the SYSTEM dir *)
+ if RegValueExists(HKEY_LOCAL_MACHINE,
+ 'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath', '') then begin
+ sysInstall := True;
+ end;
+
+ (* If so, ensure that the user can write to HKLM *)
+ if sysInstall and not RegWriteStringValue(HKEY_LOCAL_MACHINE,
+ 'Software\Python\PythonCore\%(PYTHONVER)s\Modules\wxPython',
+ '', '%(VERSION)s') then begin
+ (* if not then revert to installing to the Python dir *)
+ sysInstall := False;
+ (* and put the regkey in HKCU *)
+ RegWriteStringValue(HKEY_CURRENT_USER,
+ 'Software\Python\PythonCore\%(PYTHONVER)s\Modules\wxPython',
+ '', '%(VERSION)s');
+ end;
+