Register ActiveX/COM Components without Administrator Privileges

This tutorial describes how ActiveX/COM components (*.dll, *.ocx) can be registered without Windows administrator privileges and without calling of regsvr32. This information is mainly interesting for Visual Basic developers who usually often use ActiveX components. We provide commercial (Enigma Protector) and freeware (Enigma Virtual Box) solutions for files and registry virtualization.

Why ActiveX requires administrator privileges?

During installation of ActiveX the system writes installation settings to the registry. Later on, all Windows users can use installed components. System writes values to the HKEY_CLASSES_ROOT and HKEY_LOCAL_MACHINE which are read only if user does not have administrator privileges. That’s why regsvr32 fails to install components.

How to fix the problem?

This problem can be solved by using registry virtualization, i.e. the system that emulates the registry and allow write access to the read only items (keeping all changes virtualized in memory).
Next chapter shows detailed step-by-steps instructions how to setup registry virtualization with our secure commersial software Enigma Protector or freeware Enigma Virtual Box.

Enigma Protector step-by-step:

– go to Input panel and select input file name, the file name of the exeutable file that use ActiveX/COM

– go to Virtual Box – Files panel. Add there ActiveX/COM files, and other files you would like to virtualize (put all the files in the %DEFAULT FOLDER%)

– double click on each ActiveX file in the files tree to call Properties dialog and check the option “Register as ActiveX”

– go to Virtual Box – Registry panel. As I noted above, when the ActiveX component is being registered by the system, it writes installation settings to the HKEY_CLASSES_ROOT and HKEY_LOCAL_MACHINE. Make sure that at least these 2 paths are marked as Virtual for registry virtualization

– some dll files (that are all ActiveX components) may have DEP incompatibility. This problem may not appear if the file is not packed/protected, but it stops to work after protection. To solve this problem, go to Virtual Box – Options panel and check the option “Map Executable Files Using Temporary File”
– click Protect button and test protected executable.

Same process can be done with our freeware virtualization solution – Enigma Virtual Box. Configuration steps are the same as written above for Enigma Protector.

Also note, protected file will be working well without virtualized files. So after protection, the application may/should be distributes without virtualized files.