Alver

Good day all!

I need to register a COM component (IE bar) in Vista. I do this in the following way:
regsvr32.exe mycom.dll

Of course, I get error "0x80070005 ACCESS DENIED". After some investigation I add to manifest file next strings:
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>

I am logged in like user with "Administrator" account type. When I try to register DLL I am always get access denied error. I go thru code, and found a trouble:
::RegSetValueEx return 5, when add text to default registry key in ROOT branch.

If I logged as Administrator - everything work fine. Component registred without any problem.

How I can successfully register component under user with "administrator" account type



Re: Security for Applications in Windows Vista How to register COM component?

PhilWilson

Well you've answered your own question, and this is how it works on Vista with UAC. The short version is that Administrators on Vista run as a standard user, and this applies to processes they initiate, and if those processes requires admin privilege they need a manifest requesting consent.




Re: Security for Applications in Windows Vista How to register COM component?

PhilWilson

I should add that you can run regsvr32 using the "run as administrator" choice.




Re: Security for Applications in Windows Vista How to register COM component?

Alver

Thanks Phil. I am find that way too.

But now i need to find how the end-user will install my COM library on his own computer (i need to install some extension for IE).

Is there some easy way, or user must "run as administrator" IE, for correct registration COM library I think this is a very bad idea, to compel users to do this actions.





Re: Security for Applications in Windows Vista How to register COM component?

Alver

I resolve my trouble.
I try to install COM component as ActiveX thru IE. But on page with code for install ActiveX object was a code for show a pop-up window.

Both pop-up and activex has blocked. And IE show a reminder on top. But by default it show only information about blocked pop-up. If i click on this reminder i see in menu an ActiveX information. And if select to install it - all is go work properly - UAC ask me about permission for install action.

thanks a lot for all :)