[pywin32-bugs] [ pywin32-Bugs-3156202 ] windows script host behaviour changes after pywin32 install
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2011-01-13 09:55:33
|
Bugs item #3156202, was opened at 2011-01-12 11:48 Message generated for change (Comment added) made by cyrillebollu 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: Cyrille Bollu (cyrillebollu) Date: 2011-01-13 10:55 Message: Hi, Great! The registry changes did the trick. Many thanks! Cyrille PS: I let you close the bug ======================== What I did: ------------- Installed python-2.6 Installed http://downloads.sourceforge.net/project/pywin32/pywin32/Build%20214/pywin32-214.win32-py2.6.exe wscript //h:wscript => doesn't work (usual error) regedit wscript //h:wscript => works Note: ------ In my case I only add to create the [HKEY_CLASSES_ROOT\pysFile\Shell] hive; The rest of [HKEY_CLASSES_ROOT\pysFile] was correct. ---------------------------------------------------------------------- Comment By: Cyrille Bollu (cyrillebollu) Date: 2011-01-13 10:11 Message: >Just to be sure: "wscript //h:wscript" must be run as administrator to succeed. yes sure. I run it as local administrator Now, I've removed pywin32-214.win32-py25 from my computer and I can't manage to re-install it. I'll now reboot my computer to see if my python 2.6 & co. installation worked. If yes, I'll try your regedit trick. BR, Cyrille ---------------------------------------------------------------------- Comment By: Christoph Gohlke (cjgohlke) Date: 2011-01-13 02:24 Message: Just to be sure: "wscript //h:wscript" must be run as administrator to succeed. ---------------------------------------------------------------------- Comment By: Christoph Gohlke (cjgohlke) Date: 2011-01-13 02: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-13 02: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-13 01:26 Message: Try rename or delete HKEY_CLASSES_ROOT\pysFile ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2011-01-12 23: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 |