Registering COM Server dynamically ??

Emile van Sebille emile at fenx.com
Tue Sep 4 09:40:26 EDT 2001


You shouldn't need to be creating a new GUID for each install.  Assuming
you're doing COM and not DCOM, once you've installed you should only need to
execute your script from the windows command prompt.  On NT/2k you need the
appropriate permissions.  And you need code like the following in your
program (but you probably already know that ;-):

class fenxUtilities:
    _public_methods_ = [ 'FirstPartInsp' ]
    _reg_progid_ = "fenxCom.Util"
    _reg_clsid_ = "{3EAD7AB4-2978-4360-8F7D-33FB36E9E146}"
    def FirstPartInsp(self, nomDiam, numFlutes, nomOAL, nomLOC, radius,
reach, toolType):
        return EMSpecs(nomDiam, numFlutes, nomOAL, nomLOC, radius, reach,
toolType).retvals

if __name__=='__main__':
    print "Registering COM server..."
    import win32com.server.register
    win32com.server.register.UseCommandLine(fenxUtilities)

I did put some time into finding a way to register DCOM servers on remote
systems automagically, and found some interesting ideas to follow up on, but
I ran out of time.  It looks like I'll be out on another one like that in a
couple of weeks so I may have more later.

--

Emile van Sebille
emile at fenx.com

---------
"Sunit Joshi" <sjoshi at ingr.com> wrote in message
news:8f8ffe67.0109040504.7acd1022 at posting.google.com...
> Hello All
> I was wondering if it is possible to register a COM Server on a client
> machine dynamically; i.e. I don't have to worry about creating a new
> GUID(thru pythoncom) for each machine where I wan't to install the
> server.
>
>
> thanks
> Sunit




More information about the Python-list mailing list