[pywin32-bugs] [ pywin32-Bugs-1094803 ] postinstall failure: access denied to registry writes
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2005-10-11 19:10:22
|
Bugs item #1094803, was opened at 2005-01-03 01:13 Message generated for change (Comment added) made by sirxyzzy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1094803&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: installation Group: None Status: Open Resolution: None Priority: 5 Submitted By: Kim Davies (kjd) Assigned to: Nobody/Anonymous (nobody) Summary: postinstall failure: access denied to registry writes Initial Comment: Installing pythonwin build 203 for Python 2.4 under Windows XP, I receive the following. The installation is nonfunctioning if I try and run it (i.e. pythonw.exe) at this point. The user is an administrator, I can't think of any reason why the program would be administratively denied access to the registry. This is what the install script gave: Copied pythoncom24.dll to F:\WINDOWS\System32 \pythoncom24.dll Copied pywintypes24.dll to F:\WINDOWS\System32 \pywintypes24.dll Registered: Python.Interpreter Registered: Python.Dictionary Registered: Python Traceback (most recent call last): File "F:\Python24\Scripts\pywin32_postinstall.py", line 358, in ? install() File "F:\Python24\Scripts\pywin32_postinstall.py", line 231, in install SetPyKeyVal("Help", None, None) File "F:\Python24\Scripts\pywin32_postinstall.py", line 103, in SetPyKeyVal _winreg.SetValueEx(my_key, value_name, 0, _winreg.REG_SZ, value) WindowsError: [Errno 5] Access is denied *** run_installscript: internal error 0xFFFFFFFF *** ---------------------------------------------------------------------- Comment By: Andy Philpotts (sirxyzzy) Date: 2005-10-11 14:10 Message: Logged In: YES user_id=1203071 The workround given above evades the symtom, but the help files do not get registered (bad) I can see why this happens, checking with regedit I see that permission is indeed denied to the adminstrator (at least on my machine) This seems to be specific to Python24, and is possibly the result of a bug in some version of the Python24 install script. If I check the permissions in my registy for Python24, SYSTEM has full control, but administrator has only READ (my keys for Python23 had full control for administrator). The failure ought to be caught and a meaningful message displayed, or possibly the post install script has to run as SYSTEM, although that sounds wrong As a workround, I changed the permissions on the registry key at the Python24 level (apply to all subkeys) and ran the script again, all fixed up now. ---------------------------------------------------------------------- Comment By: Kim Davies (kjd) Date: 2005-01-03 01:26 Message: Logged In: YES user_id=168657 I note there is a comment in pywin32_postinstall.py that probably explains it, and I just put an exception handler around it, and it installed okay (presumably missing some help functionality..) New code fragment: # Register the .chm help file. chm_file = os.path.join(lib_dir, "PyWin32.chm") if os.path.isfile(chm_file): # This isn't recursive, so if 'Help' doesn't exist, we croak try: SetPyKeyVal("Help", None, None) SetPyKeyVal("Help\Pythonwin Reference", None, chm_file) except: pass else: print "NOTE: PyWin32.chm can not be located, so has not " "been registered" ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1094803&group_id=78018 |