Problem with regsvr32 on Vista with UAC

When I try to register a dll with UAC on  Vista, I get the error
the call to DllRegisterServer failed with error code 0x80070005.
If I start the cmd prompt with Run As Administrator, regsvr32 succeeds. I need to initiate this regsvr32 programmatically thru code. How do I run this regsvr32 call under admin privileges.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You have to elevate permissions to do this unless you turn off UAC (not really the best idea).    What kind of code are you attempting to use?
narayanan_mahalingamAuthor Commented:
I have a third party com dll that has to be registered using regsvr32 command.
Turning off UAC is not an option...

How are deploying it?
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

narayanan_mahalingamAuthor Commented:
thru an installer developed on dev studio 2010
Todd GerbertIT ConsultantCommented:
An installer should have already been elevated, and thus any children it starts will also be elevated.  Plus, the installer will probably load the DLL directly and call it's DllRegisterServer() function, and will not use regsvr32.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
narayanan_mahalingamAuthor Commented:
Running the installer under 'Run as administrator' fixed the problem..
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Vista

From novice to tech pro — start learning today.