Make the .pvk file and the .cer file,
using makecert (see below for example)
Make an .spc file using cert2spc
Sign the .cab file with signcode.
Visual Studio, how to have it generate a cab file automatically.
Note: I found the built in .cab creation to be too limited,
so I came up with this proceedure to automate it.
Current Method
You need to modify the Properties of the project you want to have make the
.CAB file
Bring up the projects properties on the project name Solution Explorer | context menu (right click) | Properties | Build Events | Post-Build Event
Add something like the following to make the .CAB file:
cd .\Release\
cabarc.exe n Name.cab $(ProjectDir)Name-debug.inf Name.dll "%SystemRoot%\system32\msvcr71.dll" Other.dll
Replacing Name with your ActiveX controls name, and replacing Other
with a list of other dll's that are needed to be in the cab file. Note that the
microsoft file is just an example you don't necissarily need it.
Old Method
Add a new project to your solution choose Visual C++ Projects | Win32 Project
and set to be console and an empty project.
Put the web page and the CAB file in the same place on a web server
Goto the remote machine and load up the web page, allow it to install the ActiveX control
If it does, then you are done [other than testing it on more remote machines]
Determine what DLLs it needs on the remote machine. Copy the COM DLL to the remote machine and use depends.exe on it to see what the missing DLL(s) are.
Add the new DLLs to the INF file and CAB file and try again
Try to use the .CAB file to download the component(s)
After it fails in Internet Explorer goto Tools | Internet Options | General | "Temporary Internet files" | Settings | View Files
Sort alphabetically
Near the top look for something like: ?CodeDownloadErrorLog!name={9485EC2E-75BD-490B-8D1C-278AB3F5E46E} [the GUID will be the value for the ActiveX control]
open that file in an Internet Explorer window by openning one and dragging it into it.
Close the View Files window and the Internet Options dialog