
Making Downloadable Controls.
Right, you've got your ActiveX control, what now. The first thing you should do is create a download "set".
Creating a download "set".
1.Run the Application Setup Wizard from the Visual Basic Program group.
2.Select the Next button from the Introduction page.
3.From the Select Project and Options browse for your ActiveX controls .VBP file, the VB project file and make sure the "Create Internet Download Setup" option is selected, then select the Next button.
4.Next you need to specify the directory for the files that the Setup Wizard generates, the default setting is "\windows directory\temp\swsetup". Then click the Next button.
5.Next you should decide whether you want the users of your control to download any dependant .dll or .cab files from Microsoft (the top option) or whether they should come from another location.
Select the Safety button and then select the "Safe for initialisation" and the "Safe for scripting" options (if your control is!), select the Next button.
6.If your component uses any other local (installed on your pc) ActiveX components, you'll have to specify them here, select the Local button to find extra ActiveX compnents and the Next button.
7.Setup will then determine what files you need to use your ActveX control if you need any more files, this is the place to specify them, select Next whan you're done.
8.And then Finish to create the download "set" and then OK the dialogue box that appears.
9.In the directory you specified in part 4 should be the .cab file containing your ActiveX control, a sample .html file including the code you need to add to your .html files to make your .cab file download and a /support directory which contains all the files in the .cab file (.ddf dependency file, your .ocx control and the .ocx's .inf file).
Tips
UNIX.
If you are using a UNIX server for your web site then you should remember that UNIX is CASE SENSITIVE, so the codebase= part should reflect the exact name of the .cab file, the best thing to do here is name your .cab file in upper case and make sure the codebase= part is all in upper case too.
LPK.
Also included in the .html sample file is a bit of commented out .html which reflects the location of any licensing information, so you can include a license with your ActiveX control. How do I create a lcensing package, see below.
ACTIVEX SDK.
Wherever the ActiveX SDK is mentioned, the Platform SDK also contains the same and more tools.
Signing a .cab File.
1.You need to get an .spc (security provider certificate) and .pvk (private key) from Verisign.
2.What you'll need is a Software Publishers credentials (approx. $20/£15).
3.To sign the file you need the ActiveX SDK, available from the Microsoft Site Builder Network.
4.Run signcode.exe, it's in the /bin directory in the ActiveX SDK.
5.Fill in all the missing bits and it sould sign the .cab file.
6.To test it run the chktrust from an MSDOS prompt from the /bin directory of the ActiveX SDK. chktrust -C <.cab filename>
7.You should be presented with your certificate, ta da.
Creating a License Package.
1.When you first create your project, select the Project properties menu option from the Projects menu. Then make sure the Require License Key option is checked.
2.When you have created the ActiveX control and saved it and created the Internet Download Set, run the LPKTOOL from the /bin directory of the ActiveX SDK, check the "Show only controls that support licensing" option.
3.Select the control from the left hand list box, select the Add button, followed by the Save & Exit button, which will then prompt you for a place to save the .lpk file, save it into the same directory as your Internet Download Set.
4.Modify the sample .html file from the Download Set to reflect the name of the .lpk file.
Now the only thing to do is get it loaded onto your server.