Frequently Asked Questions (FAQ) DBI Technologies Home Page
Downloads Support Products Purchase DBI
 
Skip Navigation Links.
Collapse By ControlBy Control
Expand AllAll
Expand All - .NETAll - .NET
Expand All - ActiveXAll - ActiveX
Expand Calendar Tools 3.0 for .NETCalendar Tools 3.0 for .NET
Expand ctCalendar.ocxctCalendar.ocx
Expand ctCombo.ocxctCombo.ocx
Expand ctDayView.ocxctDayView.ocx
Expand ctExplorer.ocxctExplorer.ocx
Expand ctHTML.ocxctHTML.ocx
Expand ctList.ocxctList.ocx
Expand ctMDay.ocxctMDay.ocx
Expand ctMonth.ocxctMonth.ocx
Expand MiscMisc
Expand Solutions Schedule for .NETSolutions Schedule for .NET
Expand Studio Controls for COMStudio Controls for COM
Collapse By TopicBy Topic
Expand General InformationGeneral Information
Expand LicensingLicensing
Expand Product ManagerProduct Manager
Expand TroubleshootTroubleshoot
Expand UpdatesUpdates
Expand DeploymentDeployment
Expand Platform SpecificPlatform Specific
Expand HowToHowTo
 
Topic ID: 66

How to Register ActiveX Controls on Current Windows Operating Systems with UAC Enabled?


Since the release of Windows Vista, Microsoft has included UAC as part of their operating systems. UAC is enhanced security and when it is in place active, simply running RegSvr32 or a standard installation .exe without elevating the privileges may fail (sometimes with an error, sometimes without).

The recommended way to register individual control OCX files is to launch a Command Prompt by right clicking the CommandPrompt shortcut, then selecting Run as Administrator. Run the RegSvr32 ctComponent.ocx command from that prompt.

If you need to manually register multiple controls, you can create a small batch file that includes the commands for registering each of the required controls. That batch file can then either be executed directly (using the Run as Administrator option) or run from an elevated command prompt.

Additionally, if you have written an installer .exe for your product and it registers the .ocx's make sure they right click and run the installation as Administrator (even if they are logged in as Administrator, they still need to do this.) or you build an elevation manifest for your .exe.

The short reason behind this is because the COM registries are written to the HKEY local machine which is now protected under UAC. The right-click run as Administrator tells the OS to prompt the user that something may happen as opposed to just blocking that action. This only needs to be done once on client machines, after the control is registered, the programs that use the ActiveX can read from that location.