473,395 Members | 2,783 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Registering COM python based components when not admin

Hello,

I'm failing to register a python based COM component without having
admin rights...

Using the usual hello world COM server that exist in many
books/tutorial, and works perfecty when tested as admin, I first faced
problems to write in registry as normal user.

Some inspection of win32com.server.register shows a default argument I
missed in the documentation "base=win32con.HKEY_CLASSES_ROOT" for most
calls to set things in registry.

Forcing it to HKEY_CURRENT_USER seems to help for most of the initial
complaining _set_subkeys (and I've checked with regedit that
declaration in registry was effectively started), but a little after I
fail on the following :
File "C:\...\register.py", line 269, in RegisterServer
regCat.RegisterClassImplCategories(clsid, catids)
pywintypes.com_error: (-2147024891, 'Acc\xe8s refus\xe9.', None, None)

Unfortunately for me, regCat is a PyICatRegister object returned by
_cat_registrar, coming from a call to pythoncom.CoCreateInstance and
there's no source code I've found for pythoncom (looks it's a compiled
DLL). I tried to add base=win32con.HKEY_CURRENT_USER to
CoCreateInstance call but it complains there are no names args.

Any chance pythoncom is bluntly trying to write in HKEY_CLASSES_ROOT
tree just like register does ?
Any ideas or known workaround ?

Thanks in advance !

Jan 18 '06 #1
2 2267
To register the com server for only the current user,
your base key should be
HKEY_CURRENT_USER\SOFTWARE\Classes
instead of just HKCU.

However, I don't know if this will solve your problem
or not. The ICatRegister interface is supplied by the
system, so nobody but MS has the source code to the
RegisterClassImplCategories method. I don't see
anything in the SDK docs indicating how it determines
whether it should write to HKCU or HKLM.

hth
Roger
"tooper" <go********@tooper.org> wrote in message news:11*********************@g44g2000cwa.googlegro ups.com...
Hello,

I'm failing to register a python based COM component without having
admin rights...

Using the usual hello world COM server that exist in many
books/tutorial, and works perfecty when tested as admin, I first faced
problems to write in registry as normal user.

Some inspection of win32com.server.register shows a default argument I
missed in the documentation "base=win32con.HKEY_CLASSES_ROOT" for most
calls to set things in registry.

Forcing it to HKEY_CURRENT_USER seems to help for most of the initial
complaining _set_subkeys (and I've checked with regedit that
declaration in registry was effectively started), but a little after I
fail on the following :
File "C:\...\register.py", line 269, in RegisterServer
regCat.RegisterClassImplCategories(clsid, catids)
pywintypes.com_error: (-2147024891, 'Acc\xe8s refus\xe9.', None, None)

Unfortunately for me, regCat is a PyICatRegister object returned by
_cat_registrar, coming from a call to pythoncom.CoCreateInstance and
there's no source code I've found for pythoncom (looks it's a compiled
DLL). I tried to add base=win32con.HKEY_CURRENT_USER to
CoCreateInstance call but it complains there are no names args.

Any chance pythoncom is bluntly trying to write in HKEY_CLASSES_ROOT
tree just like register does ?
Any ideas or known workaround ?

Thanks in advance !


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Jan 19 '06 #2
Thanks for the hint !

Jan 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: David | last post by:
I have my program dynamically register custom ActiveX components when it starts. On the most part, this works great for all my customers, except my own internal ones. Our Win2k computers are locked...
36
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but...
3
by: Michael Sparks | last post by:
Hi, I'm posting a link to this since I hope it's of interest to people here :) I've written up the talk I gave at ACCU Python UK on the Kamaelia Framework, and it's been published as a BBC...
0
by: Paul B | last post by:
Hi, I am developing a small application for my company to deploy updates to some custom software. Occassionally this requires additional or updated dll's to be installed on the target...
9
by: corey.coughlin | last post by:
Alright, so I've been following some of the arguments about enhancing parallelism in python, and I've kind of been struck by how hard things still are. It seems like what we really need is a more...
10
by: James Stroud | last post by:
Hello All, I am interested in setting up a modest invoicing system for some consulting I am doing. I like the idea of managing this on the web and creating invoices and printing them from a...
122
by: Edward Diener No Spam | last post by:
The definition of a component model I use below is a class which allows properties, methods, and events in a structured way which can be recognized, usually through some form of introspection...
5
by: Geoff Blood | last post by:
Using Visual Studio 2005 I have VB project that produces a program that is to be deployed using a VS2005 deployment project. There are some legacy COM components that need to be registered with...
0
by: Tim Spens | last post by:
--- On Fri, 6/27/08, Tim Spens <t_spens@yahoo.comwrote: I think I know where the problem is but I'm unsure how to fix it. When I call Register_Handler(...) from python via...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.