VCX library. Deployment

Subscribe to RSS news feed


To deploy your application which uses VCX Library you need to register the library on a target computer. Usually you accomplish this by running regsvr32.exe utility either automatically or manually:

  > regsvr32.exe VCProX.ocx

If you own the Enterprise license of the VCX Library, you may use the silent registration approach. To do so you have to pass the registration information as a regsvr32.exe /i parameter:

  > regsvr32.exe "VCProX.ocx" "/i:Lake of Soft|SSSS-000-011" /s

(replace the above values with real name and serial number)

Another option is to use the license file during installation. It is not recommended, as this file may be easily seen by other users.

If you wish to provide the registration information via file, create a new file and save your registration information as Name|Serial into this file.

When installing, the path to this file (on target machine) could be specified using /i parameter:

  > regsvr32.exe "c:\myapplication\VCProX.ocx" "/i:" /s

In addition we also include the install_VCX.exe utility, which works exactly the same as regsvr32.exe and have same parameters. This utility is located in \common\ folder of VCX Library installation.

When installing under Vista/7 regsvr32.exe may fail to register the OCX. You have to elevate the priveleges of your setup application notifying UAC. To do so, rename your setup application so it will include "setup" or "install" word.

Another option is to include the "requestedPrivileges" into seput's manifest. More info in MSDN: Create and Embed an Application Manifest (UAC).

If nothing helps, try our install_VCX.exe application instead of regsvr32.exe.

VCX Library saves the registration key into Windows Registry. The registration key is stored in the encoded format, which also prevents re-using it on another computer without proper installation.

These tasks can be automated with your software installer. Some are mentioned below.

ClickOnce (Visual Studio 2005)

In Visual Studio 2005 you can use ClickOnce technology to publish your solution to the Internet or your local network.

In this case you have to use the "isolated" VCX library reference. Select the AxVCProX reference in the Solution Explorer window, activate the Properties window and set the Isolated property to True:

Click for full sized image

You can also use a silent registration approach provided by the VCX Enterprise license. Create the VCProX.lic file, put your registration key there and add this file to your project. Select the VCProx.lic file in the Solution Explorer window, activate the Properties window and set the Build Action property to Content:

(this feature is only available in the latest beta version now) Click for full sized image

When installing your application on a target computer you may get the following error: "Unable to install or run the application. The application requires that assembly stdole Version 7.0.3300.0 be installed in the Glabal Assembly Cashe (GAC) first". In this case, please open your project properties, the Publish tab, click the Application files button and change the stdole.dll settings from Prerequisite to Include:

Click for full sized image


If you use InnoSetup installer, you can use the following script to deploy the VCX library (deploy the VCProX.lic file containing your registration key if you use the silent registration approach supported by the Enterprise license):

Download the script file
; VCX library files: .ocx + registration key
Source: "VCProX.ocx"; DestDir: "{app}"; Flags: regserver;
Source: "VCProX.lic"; DestDir: "{sys}";

; Your application files
Source: "App.exe"; DestDir: "{app}";