Problem installing .cab file (ActiveX) on Windows Vista and 7

I created an ActiveX control and made my .cab file for automatic installation on a client machine using Internet Explorer. It works fine in Windows XP, but in Windows Vista and Windows 7 its installation is blocked by UAC (user account control), and when I turn it off, everything works fine ... I signed my .cab file with the certificate for development enviornment .. What is the way to overcome this problem .. I do not want to tell users to disable their UAC module ...

+3
source share
1 answer

This is most likely due to the fact that you are trying to register your control with HKEY_LOCAL_MACHINE, which is used by default in ATL. If you change your control to register with HKEY_CURRENT_USER (the only part of the registry available when the UAC is on and you are not raised), you should be fine.

If you are using VS2008 and ATL, you can do this by calling:

AtlSetPerUserRegistration(perUser);

In older versions you need to crack a little more. Here is the class we used to solve the problem in FireBreath, a cross-platform plugin that supports:

http://code.google.com/p/firebreath/source/browse/src/ActiveXPlugin/axutil.cpp http://code.google.com/p/firebreath/source/browse/src/ActiveXPlugin/axutil.h

then you just need to put: FbPerUserRegistration perUser(true);at your entry points DllRegisterServer and DllUnregisterServer.

( .cab, ), msdn, .cab , :

http://msdn.microsoft.com/en-us/library/dd433049%28VS.85%29.aspx

, Process Monitor, , , ; , , , . HKCR (HKEY_CLASSES_ROOT), HKEY_LOCAL_MACHINE/ /. ( ), HKEY_CURRENT_USER/ /.

,

+1

Source: https://habr.com/ru/post/1723449/