Re: How to build + register COM objects when logged in as user?

From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 10/04/04


Date: Sun, 3 Oct 2004 23:20:08 -0700

Check out RegOverridePredefKey(). E.g. point HKCR
to HKCU\SOFTWARE\Classes. Disclaimer: I know this in
theory, but I've never tried it in practice.

-- 
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Riley DeWiley" <riley.dewiley@gmail.com> wrote in message 
news:10lv6o340v0b39@corp.supernews.com...
>I have done so and now get TYPE_E_REGISTRYACCESS The system registration
> database could not be opened.
>
>
> when I call RegisterTypeLib(). I assume this means I need ADMIN access.
>
> I assume users will have ADMIN access when they install; I am just trying 
> to
> work at non-admin access and debug and install my code.
>
>
> "Alexander Nickolov" <agnickolov@mvps.org> wrote in message
> news:OqQNLcQqEHA.596@TK2MSFTNGP11.phx.gbl...
>> You have to change the registration script so it registers
>> your component under HKCU\SOFTWARE\Classes
>> instead of HKCR. This means it will only be useable under
>> Win2K and later (not Win9x/Me, nor NT4/3.5).
>>
>> --
>> =====================================
>> Alexander Nickolov
>> Microsoft MVP [VC], MCSD
>> email: agnickolov@mvps.org
>> MVP VC FAQ: http://www.mvps.org/vcfaq
>> =====================================
>> "Riley DeWiley" <riley.dewiley@gmail.com> wrote in message
>> news:10lu9egnt2felaf@corp.supernews.com...
>> >I am developing a COM DLL in C++. At the tail end of my build cycle, the
>> >IDE
>> > tries to register my DLL. It is failing, reason is ACCESS_DENIED, which
> I
>> > expect, because after running as Administrator for years, I have
> recently
>> > adopted the principle of least-access, and now log in under a user
>> > account.
>> > When I install software, for example, I have to 'run-as' Administrator.
>> >
>> > I wish to be able register the objects from the IDE while obeying the
>> > principle of least access. What is the easiest way to do this on a
> routine
>> > basis? Ideally, I would not have to change my build process at all.
>> >
>> > Thanks in advance.
>> >
>> >
>>
>>
>
> 


Relevant Pages


Quantcast