How to build an MSI to deploy ActiveX control

1. Create a new Setup and Deployment Project in Visual Studio.

 

2. Include the ocx files in the Project using the “File System Editor” as in

https://msdn2.microsoft.com/en-us/library/4ddxk2ye(VS.80).aspx

It’s better to have the files in system32 folder.

 

3. Go to the launch conditions editor and create a new File search to search for

the files regsvr32.exe and rundll32.exe under system32

https://msdn2.microsoft.com/en-us/library/0x2fc4kd(VS.71).aspx

The Property that will be set in the Launch Conditions editor will be used in the MSI package to go

the registration of the ocx files.

 

4. Build the setup Project.

 

5. The rest of the steps are to be done using a Platform SDK tool called ORCA. This

tool can be installed from the folder “C:\Program Files\Microsoft Platform SDK\Bin”

after installing the Platform SDK from the link

 

6. Once we have ORCA installed, right click on the MSI built using the Setup and

deployment project (this should be in your output folder) and select Edit with

ORCA.

 

7. This will open the MSI for further editing in ORCA. On the left side find a

table named “CustomAction” and select it. Towards the right pane you should be able

to see some Custom Actions already added by default. Right Click and select “Add Row”

 

 

8. In the Action field type a name to the CustomAction

(For example : other_cisco_controls), in the Target field type in 3122, in the Source field type

the name of the Property that you used in step 3.

 In the Target field type /s “[SystemFolder]<name of the ocx file>”

 

9. Similarly create other CustomActions to register other ocx files.

 

 

10. The last step is to sequence these CustomActions to run. To do this on the left

pane in ORCA find a table called “InstallExecuteSequence” and select.

Right click on the right pane to add a new row.

 

11. In the Action field type in the name of the CustomActions as you had typed in

step 8. In the condition field type “Not Installed” and in the Sequence field type

a number 6400 and lesser than 6600.

 

12. Save the MSI file using ORCA and test the package.

 

 

Contributor : Ravi Shankar