From: SourceForge.net <no...@so...> - 2011-01-13 01:19:47
|
Bugs item #3156202, was opened at 2011-01-12 02:48 Message generated for change (Comment added) made by cjgohlke You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3156202&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Cyrille Bollu (cyrillebollu) Assigned to: Nobody/Anonymous (nobody) Summary: windows script host behaviour changes after pywin32 install Initial Comment: Hi, This problem has been reported on http://pythonforum.org/topic62-pywin32-and-windows-script-host-problem.html. I'm experiencing the same problem. The bug is reproductible (validated with http://surfnet.dl.sourceforge.net/sourceforge/pywin32/pywin32-214.win32-py2.5.exe): 1- take a computer where pywin32 is not installed 2- open a cmd prompt and type "wscript //h:wscript" => you get a prompt telling you that the default script host has been changed 3- install http://surfnet.dl.sourceforge.net/sourceforge/pywin32/pywin32-214.win32-py2.5.exe 4- open a new cmd prompt and type "wscript //h:wscript" => you get "can't change the default script host" This problem might seem minor but in my company we use this "wscript //h:wscript" command to silently install softwares on client computers. And, when this problem occurs, our silent installation fails. I will gladly help but I don't have visual studio. Best regards, Cyrille ---------------------------------------------------------------------- Comment By: Christoph Gohlke (cjgohlke) Date: 2011-01-12 17:19 Message: Seems that [HKEY_CLASSES_ROOT\pysFile\Shell\Open] and [HKEY_CLASSES_ROOT\pysFile\Shell\Open2] keys need to be set in the pywin32\com\win32comext\axscript\client\pyscript.py DllRegisterServer() function. The following registry file works for me on Windows 7: REGEDIT4 [HKEY_CLASSES_ROOT\pysFile] @="Python Script File" [HKEY_CLASSES_ROOT\pysFile\ScriptEngine] @="Python" [HKEY_CLASSES_ROOT\pysFile\ShellEx] [HKEY_CLASSES_ROOT\pysFile\ShellEx\DropHandler] @="{60254CA5-953B-11CF-8C96-00AA00B8708C}" [HKEY_CLASSES_ROOT\pysFile\ShellEx\PropertySheetHandlers] [HKEY_CLASSES_ROOT\pysFile\ShellEx\PropertySheetHandlers\WSHProps] @="{60254CA5-953B-11CF-8C96-00AA00B8708C}" [HKEY_CLASSES_ROOT\pysFile\Shell\Open] [HKEY_CLASSES_ROOT\pysFile\Shell\Open\Command] @=hex(2):22,25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,53,79,73,74,65,6d,33,32,5c,\ 57,53,63,72,69,70,74,2e,65,78,65,22,20,22,25,31,22,20,25,2a,00 [HKEY_CLASSES_ROOT\pysFile\Shell\Open2] @=hex(2):4f,70,65,6e,20,26,77,69,74,68,20,43,6f,6d,6d,61,6e,64,20,50,72,6f,6d,\ 70,74,00 "MUIVerb"=hex(2):40,25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,53,79,73,74,65,6d,\ 33,32,5c,77,73,68,65,78,74,2e,64,6c,6c,2c,2d,34,35,31,31,00 [HKEY_CLASSES_ROOT\pysFile\Shell\Open2\Command] @=hex(2):22,25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,53,79,73,74,65,6d,33,32,5c,\ 43,53,63,72,69,70,74,2e,65,78,65,22,20,22,25,31,22,20,25,2a,00 ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2011-01-12 17:15 Message: In my (limited) testing, I unregistered the AXScript engine (python ...\axscript.py --unregister), which deletes that key and a number of others, and the problem remains. I can't verify it ever did work for me though... ---------------------------------------------------------------------- Comment By: Christoph Gohlke (cjgohlke) Date: 2011-01-12 16:26 Message: Try rename or delete HKEY_CLASSES_ROOT\pysFile ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2011-01-12 14:33 Message: I can't see how python could manage to do this. Some googling shows other people are having a similar issue without Python being installed - I wonder if the installation of *any* WSH-compatible scripting language is causing the problem? > I will gladly help but I don't have visual studio. You don't need visual studio - running wscript.exe like that shouldn't be loading Python at all (and certainly can't once it is uninstalled but the problem remains). I expect something we write to the registry isn't being cleaned up or something... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3156202&group_id=78018 |