#461 Cannot register active scripting with pyscript.py

com (105)

Using Windows 7 Ultimate, I am having trouble installing active scripting for Python 3.1. I'm talking about the following installers:


On WXP, it would usually install active scripting fine from the get-go, but I knew from experience that failed sometimes, which it did now. So I went to C:\Python31\Lib\site-packages\win32comext\axscript\client and ran pyscript.py. Whereas in the past, that would work, I get very colourful errors.

First one dialog that is littered with random characters that seem like chinese right after displaying the 'Requesting elevation and retrying...' line, once even a full page of that corrupted junk. Example:

'[Window Title]
㩃坜湩潤獷獜獹整㍭尲浣⹤硥e†ɛ础䫁湥耀ɂ洨ɂ欠ɂ쥨ɂ槠ɂ즸ɂ죈ɂ棈ɂ硋䫁睯耀ɂ辀ɂ輰ɂ쩘ɂ計ɂ뱠ɂ歯湥⠠⁡硎䫁汰耀 ɂ쭈ɂ苘ɂ莠ɂ쯨ɂ衸ɂ걨Ɂ靐Ɂ硑䫁杮耀%ɂ蟘ɂ蠀ɂ챠ɂ諸ɂ軠ɂ鿨ḟ雠Ɂ硔䫁漠耀*?痨?и?欰Ḝ畂汩偤瑡彨牟敶⹲硟䫁琊耀/ḟ锐Ɂ铠Ɂ钀Ɂ鑰ɁꮐɁꯀɁ隰Ɂ硢䫁敭耀4ḟ鿨ḟ需Ɂ鿨ḟ鿨ḟ陀Ɂ鿨ḟ靀Ɂ硥䫁⹳耀9ḟ鿨ḟ꤈Ɂ隐Ɂ鿨ḟ隀Ɂ鿨ḟ霰Ɂ硨䫁桴耀>久佃䥄䝎琠歯湥眊楨档琠汥獬礠畯硳䫁档耀C摯湩⁧慷⁳獵摥琠敤潣敤琠敨戠硶䫁猠耀H⹭᩵

Windows cannot find '㩃坜湩潤獷獜獹整㍭尲浣⹤硥e†ɛ础䫁湥耀ɂ洨ɂ欠ɂ쥨ɂ槠ɂ즸ɂ죈ɂ棈ɂ硋䫁睯耀ɂ辀ɂ輰ɂ쩘ɂ計ɂ뱠ɂ歯湥⠠⁡硎䫁汰耀 ɂ쭈ɂ苘ɂ莠ɂ쯨ɂ衸ɂ걨Ɂ靐Ɂ硑䫁杮耀%ɂ蟘ɂ蠀ɂ챠ɂ諸ɂ軠ɂ鿨ḟ雠Ɂ硔䫁漠耀*?痨?и?欰Ḝ畂汩偤瑡彨牟敶⹲硟䫁琊耀/ḟ锐Ɂ铠Ɂ钀Ɂ鑰ɁꮐɁꯀɁ隰Ɂ硢䫁敭耀4ḟ鿨ḟ需Ɂ鿨ḟ鿨ḟ陀Ɂ鿨ḟ靀Ɂ硥䫁⹳耀9ḟ鿨ḟ꤈Ɂ隐Ɂ鿨ḟ隀Ɂ鿨ḟ霰Ɂ硨䫁桴耀>久佃䥄䝎琠歯湥眊楨档琠汥獬礠畯硳䫁档耀C摯湩⁧慷⁳獵摥琠敤潣敤琠敨戠硶䫁猠耀H⹭᩵'. Make sure you typed the name correctly, and then try again.


This makes me think buffer overrun or some codepage/encoding issues.

After that I get an ordinary stacktrace:

Requesting elevation and retrying...
Failed to remove tempfile 'c:\users\me\appdata\local\temp\tmpx2_leopycomserverreg.out': [Error 2] The system cannot find the file specified: 'c:\\users\\me\\appdata\\local\\temp\\tmpx2_leopycomserverreg.out'
Traceback (most recent call last):
File "C:\Python31\lib\site-packages\win32com\server\register.py", line 566, in UseCommandLine
RegisterClasses(*classes, **flags)
File "C:\Python31\lib\site-packages\win32com\server\register.py", line 421, in RegisterClasses
addPyComCat, dispatcherSpec, clsctx, addnPath)
File "C:\Python31\lib\site-packages\win32com\server\register.py", line 187, in RegisterServer
_set_string(keyNameRoot, desc)
File "C:\Python31\lib\site-packages\win32com\server\register.py", line 32, in _set_string
pywintypes.error: (5, 'RegSetValue', 'Access is denied.')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Python31\Lib\site-packages\win32comext\axscript\client\pyscript.py", line 372, in <module>
File "C:\Python31\Lib\site-packages\win32comext\axscript\client\pyscript.py", line 368, in Register
File "C:\Python31\lib\site-packages\win32com\server\register.py", line 574, in UseCommandLine
File "C:\Python31\lib\site-packages\win32com\server\register.py", line 531, in ReExecuteElevated
pywintypes.error: (2, 'ShellExecuteEx', 'The system cannot find the file specified.')

Are there any simple temporary fixes for this? I'd love to get this up and running. :)


  • Mark Hammond

    Mark Hammond - 2009-12-24

    A work around may be to use an elevated command prompt (ie, started with "Run as Administrator") and executing pyscript.py there. If that fails too, I suspect it will be a general problem with Python 3.x - trying Python 2.6 should also work.

  • Comment has been marked as spam. 

    You can see all pending comments posted by this user  here

    Anonymous - 2009-12-24

    Yeah I found that out myself after like one hour of code-sifting. Thanks :)

    Last edit: Anonymous 2015-11-28
  • Mark Hammond

    Mark Hammond - 2012-01-28
    • status: open --> closed-works-for-me
  • Mark Hammond

    Mark Hammond - 2012-01-28

    I can't reproduce this with the current source tree - please re-open if it still happens once build 217 comes out (which should be soon!)


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks