[python-win32] Finding the COM server

Tim Roberts timr at probo.com
Fri Oct 12 20:24:15 CEST 2007


Kevin Patterson wrote:
> Does the registry get updated every time the comserver is run? For
> example I know some of my users keep multiple copies of the same rev
> (or different revs) in different directories. My script often gets
> called after the COM server is up and running:
>
> So user has:
> C:\appA\app.exe
> and
> C:\appB\app.exe
>
> The appA may be the one originally installed, but appB directory may
> be another copy of the same app only with different config files. If
> the user ran appB would the register still points to appA.

Well, this is a good question, and having looked into it in more depth,
I've discovered that I don't know the answer.

Out-of-process servers call CoRegisterClassObject to register their
classes with the COM runtime.  That doesn't change the registry.  I
can't find a COM utility to return the process ID for a given CLSID, and
without that, I don't know how you'd find the executable name.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list