[Greg Miller] | I have a .DLL that I am extracting the file version from using wmi.py. | The specific code is: | | c = wmi.WMI() | for f in | c.CIM_DataFile(Name="c:\\glossersdmsservices\\bin\\glosscmanag | er.dll"): | sdmsver = f.Version | | this works fine when running the application as a python file, when I | build the application into an executable, using py2exe, I get the | following error: | | Traceback (most recent call last): | File "autoStart.pyc", line 241, in test | File "wmi.pyc", line 138, in ? | File "win32com\client\gencache.pyc", line 540, in EnsureDispatch | File "win32com\client\CLSIDToClass.pyc", line 50, in GetClass | KeyError: '{D2F68443-85DC-427E-91D8-366554CC754C}'
You could try using the tweaked version 0.6b from: http://timgolden.me.uk/python/downloads/wmi-0.6b.py which doesn't use the EnsureDispatch and so doesn't (I think) need the type library. If you do decide to try, let me know if it works; it was designed for someone else's py2exe-wmi issue, but I never heard back as to whether he'd tried it. TJG ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ -- http://mail.python.org/mailman/listinfo/python-list