[python-win32] py2exe, COM servers on machine without py2exe
Sam Hendley
shendley at email.unc.edu
Tue Apr 26 07:20:30 CEST 2005
I hope I am posting on the correct list but in my trolling (as in
google, not the bad kind) of the web I found some posts from both Mark
Hammond and Thomas Heller, who I gathered wrote py2exe.
Here is the situation:
We wrote a PowerPoint plugin in python. It uses a number of com classes
for recieving events but there is apparently only one comserver and that
creates PowerPointUI.dll. It also creates 13 .pyd files, python23.dll,
pythoncom23.dll, pywintypes23.dll.
On the machine we run the original setup the dll registers fine and the
plugin works great running from the dll.
On a machine without py2exe (either with Python installed or without) I
get the following error:
Command Line:
regsvr32 PowerPointUI.dll
Returned:
DllRegisterServer in PowerPointUI.dll failed.
Return code was: 0x80040201
I did a bunch of searching on the web and ran into a post that suggested
using regmon to see what registry entries regsvr32 is accessing.
I found that regsvr32 had all attempts to access missing keys. (listed
at the bottom; sorry for the length, i am not sure what will be important).
We do the traceutils stuff and it has allways worked but I dont see
anything at all when I try to register the dll.
I am hoping that we are just miss configuring something beacuse we
really didnt want to have to force our users to have python, py2exe,
win32all installed to run the powerpoint plugin.
Here is the setup file we use:
###########################################################################
#### PY2EXE INSTALLER SCRIPT
#### Collects all necessary python infrastructure needed to run our
#### program and compiles our program as well as necessary python
#### infrastructure components into a DLL and compiled python classes
###########################################################################
from distutils.core import setup
import py2exe
## Py2exe target package information
class Target:
def __init__(self, **kw):
self.__dict__.update(kw)
## Information for the version and info resources
self.version = "1.2"
self.company_name = "UNC Remote PowerPoint Team"
self.name = "RemotePowerPoint"
#########################################################################
## Create PowerPoint Addin COM server DLL, server module is required arg
#########################################################################
powerpoint = Target(
description = "Python Remote PowerPoint Server",
## Build source file. For COM servers, the module name (not the
## filename) must be specified!
modules = ["PowerPointUI"],
create_exe = False,
)
#########################################################################
## This is a list of modules to include in our DLL (includes)
#########################################################################
includes = ["encodings", "encodings.*"]
###########################################################################################
## Build function. (Creates the DLL)
## Options: typelibs specifies the external libraries needed for program
gotten from Python
## gen_py directory when necessary.
## Zipfile: Determines whether compiled code and external libraries are
placed
## in a zipfile or in the DLL itself, specify zipfile name or None.
## Com_server: specify name of source functions for COM servers listed
above for building.
## Console: specify name of source functions for scripts listed above
for building.
###########################################################################################
setup(
options = {"py2exe": {"packages": ["encodings"],
"typelibs":
## typelib for PowerPoint, Microsoft Office,
and Microsoft Addin
[('{91493440-5A91-11CF-8700-00AA0060263B}', 0,
2, 8),
('{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}', 0,
2, 3),
('{AC0714F2-3D04-11D1-AE7D-00A0C90F26F4}', 0,
1, 0,)],
"includes": includes,
}},
zipfile=None,
com_server = [powerpoint],
)
#############################################################################################
If anyone has any hints or questions let me know, I wrote this email at
1am after me and my group spent ~30 of the last 65 hours working on
getting the Addin running.
Thanks,
Sam
-----------------------------Registry Entries--------
105.42526245 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\python23.dll NOT FOUND
105.42537689 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\PowerPointUI.dll NOT FOUND
105.42812347 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\PythonPath SUCCESS Access:
0x20019
105.42816925 regsvr32.exe:544 QueryKey
HKLM\Software\Python\PythonCore\2.3\PythonPath SUCCESS Subkeys = 0
105.42823792 regsvr32.exe:544 CloseKey
HKLM\Software\Python\PythonCore\2.3\PythonPath SUCCESS
105.42832184 regsvr32.exe:544 OpenKey HKCU SUCCESS
Access: 0x2000000
105.42836761 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\PythonPath NOT FOUND
105.42970276 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\warnings NOT FOUND
105.42974854 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\warnings NOT FOUND
105.44274902 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\types NOT FOUND
105.44279480 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\types NOT FOUND
105.44439697 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\linecache NOT FOUND
105.44444275 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\linecache NOT FOUND
105.44573975 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\os NOT FOUND
105.44578552 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\os NOT FOUND
105.44841003 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\ntpath NOT FOUND
105.44846344 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\ntpath NOT FOUND
105.45022583 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\stat NOT FOUND
105.45028687 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\stat NOT FOUND
105.45209503 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\UserDict NOT FOUND
105.45214081 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\UserDict NOT FOUND
105.45619202 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\copy_reg NOT FOUND
105.45624542 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\copy_reg NOT FOUND
105.45875549 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\win32api NOT FOUND
105.45880127 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\win32api NOT FOUND
105.46139526 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\pywintypes23.dll NOT FOUND
105.46148682 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\win32api.pyd NOT FOUND
105.46235657 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\secur32.dll NOT FOUND
105.46266174 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\pythoncom NOT FOUND
105.46270752 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\pythoncom NOT FOUND
105.46308899 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\pywintypes NOT FOUND
105.46313477 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\pywintypes NOT FOUND
105.46788025 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\pythoncom23.dll NOT FOUND
105.46907806 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\win32com NOT FOUND
105.46913147 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\win32com NOT FOUND
105.47978210 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\winerror NOT FOUND
105.47983551 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\winerror NOT FOUND
105.48683167 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\string NOT FOUND
105.48687744 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\string NOT FOUND
105.50009155 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\win32con NOT FOUND
105.50014496 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\win32con NOT FOUND
105.52662659 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\traceback NOT FOUND
105.52857208 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\traceback NOT FOUND
105.54042816 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\win32trace NOT FOUND
105.54047394 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\win32trace NOT FOUND
105.54355621 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\win32trace.pyd NOT FOUND
105.54669952 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\PowerPointUI NOT FOUND
105.54882813 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\PowerPointUI NOT FOUND
105.57278442 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\new NOT FOUND
105.57474518 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\new NOT FOUND
105.59278107 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\keyword NOT FOUND
105.59474182 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\keyword NOT FOUND
105.61274719 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\glob NOT FOUND
105.61279297 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\glob NOT FOUND
105.61373138 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\fnmatch NOT FOUND
105.61582947 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\fnmatch NOT FOUND
105.61833954 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\re NOT FOUND
105.61838531 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\re NOT FOUND
105.61870575 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\sre NOT FOUND
105.62093353 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\sre NOT FOUND
105.62374115 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\sre_compile NOT FOUND
105.62377930 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\sre_compile NOT FOUND
105.62651062 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\_sre NOT FOUND
105.62852478 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\_sre NOT FOUND
105.62955475 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\_sre.pyd NOT FOUND
105.63195801 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\sre_constants NOT
FOUND
105.63223267 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\sre_constants NOT
FOUND
105.63526917 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\sre_parse NOT FOUND
105.63531494 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\sre_parse NOT FOUND
105.65231323 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\socket NOT FOUND
105.65461731 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\socket NOT FOUND
105.65761566 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\_socket NOT FOUND
105.65766144 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\_socket NOT FOUND
105.66287994 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\WS2HELP.dll NOT FOUND
105.66292572 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\WS2_32.dll NOT FOUND
105.66300201 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\WSOCK32.dll NOT FOUND
105.66305542 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\_socket.pyd NOT FOUND
105.73336792 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\_ssl NOT FOUND
105.73340607 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\_ssl NOT FOUND
105.73645020 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\_ssl.pyd NOT FOUND
105.74414825 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\win32clipboard NOT
FOUND
105.74418640 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\win32clipboard NOT
FOUND
105.74540710 regsvr32.exe:544 OpenKey
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\win32clipboard.pyd NOT FOUND
105.74559784 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\handler NOT FOUND
105.74562836 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\handler NOT FOUND
105.74611664 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\pickle NOT FOUND
105.74614716 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\pickle NOT FOUND
105.74835205 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\org NOT FOUND
105.74839020 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\org NOT FOUND
105.75250244 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\StringIO NOT FOUND
105.75253296 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\StringIO NOT FOUND
105.75356293 regsvr32.exe:544 OpenKey
HKCU\Software\Python\PythonCore\2.3\Modules\win32traceutil NOT
FOUND
105.75360107 regsvr32.exe:544 OpenKey
HKLM\Software\Python\PythonCore\2.3\Modules\win32traceutil NOT
FOUND
More information about the Python-win32
mailing list