Load ActiveX DLL in Internet Explorer with elevated privileges
- by adum
I have an ActiveX control that I'm loading with JavaScript in Internet Explorer. It needs to run as medium integrity under UAC in Vista and Win7. This is written in C/C++, compiled in Visual Studio.
One way to elevate privileges is to create a broker process that can request a medium integrity level. However, for this project, this is not a practical solution. I really need the ActiveX control itself to run elevated.
My question is: what's the easiest way to do this? Can I change the build options on the project to be an exe, and use the COM interprocess connect system to automatically handle the communications, or do I need to be more sophisticated? Do I need to do anything complicated like manually call CreateProcess and make some kind of broker, or can it just work as an ActiveX exe that elevates itself?