user rights and python com servers

S

sniffer

hi all,
i am facing a peculiar problem with a python com server i've developed
the com server runs fine in winxp standalone systems but if the
system is part of a domain then until the logged in user is given
power user rights i am unable to register the dll using regsvr32 , a
similar problem i face on vista system here unless and untill the app
utilising the dll is run with admin privelleges the dll does not get
registered and does not function as a result.


any pointers on how to avoid this rights issue will be great also if
it is of some consequence i am using the python wmi module also in
this dll.
 
M

Mark Hammond

hi all,
i am facing a peculiar problem with a python com server i've developed
the com server runs fine in winxp standalone systems but if the
system is part of a domain then until the logged in user is given
power user rights i am unable to register the dll using regsvr32 , a
similar problem i face on vista system here unless and untill the app
utilising the dll is run with admin privelleges the dll does not get
registered and does not function as a result.

This is a "feature" of Vista and later - you must have elevated
permissions to write to the place in the registry where "global" COM
objects are stored. By default, the standard win32com registration code
will attempt to elevate and register if necessary.

Note that it is also possible in theory to register COM objects just for
a single user, but while win32com doesn't support that directly it
shouldn't be hard to support this with a few changes to
win32com\server\register.py

HTH,

Mark
 
S

sniffer

This is a "feature" of Vista and later - you must have elevated
permissions to write to the place in the registry where "global" COM
objects are stored.  By default, the standard win32com registration code
will attempt to elevate and register if necessary.

Note that it is also possible in theory to register COM objects just for
a single user,while win32com doesn't support that directly it
shouldn't be hard to support this with a few changes to
win32com\server\register.py

HTH,

Mark

Thanks Mark,
just one question does the explanation given above by you also apply
to winxp systems in a domain,if so then what is the minimum level of
user rights required for the com server to run without hiccups.

TIA
 
M

Mark Hammond

Thanks Mark,
just one question does the explanation given above by you also apply
to winxp systems in a domain,

Yeah - IIRC, domain users can't change much of the registry by default,
primarily as they aren't in the 'administrators' or 'power user' groups
by default like local users are - but it all depends on various security
policies and attributes of each user.
if so then what is the minimum level of
user rights required for the com server to run without hiccups.

Any user can *run* the server - just not all can register it. To
register it, the user needs the ability to write to the
HKEY_CLASSES_ROOT hive in the registry. This is the same problem
forcing may installation programs to insist on being run as an
administrator even if the program itself doesn't need to be.

Cheers,

Mark
 
S

sniffer

Yeah - IIRC, domain users can't change much of the registry by default,
primarily as they aren't in the 'administrators' or 'power user' groups
by default like local users are - but it all depends on various security
policies and attributes of each user.


Any user can *run* the server - just not all can register it.  To
register it, the user needs the ability to write to the
HKEY_CLASSES_ROOT hive in the registry.  This is the same problem
forcing may installation programs to insist on being run as an
administrator even if the program itself doesn't need to be.

Cheers,

Mark

Thanks Mark for all your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top