Unable to install ActiveX controls from.cab files in Enhanced Protected Mode. By design Issue #3281182. Open new issue. Are there magic runes expected of cab files in the scenario? If so, please point us to the appropriate documentation. You need to sign in to your Microsoft account to add a comment. Active Example of Embedded ActiveX Controls with. You can download pre-made, Iocomp digitally signed cabinet files of all of our components by clicking.
Aurigma offers private-label versions as a part of our Premium licenses. When your customers install ActiveX/Java Uploader on their computers, they see a security warning displaying the name of the company that owns the software. By default, customers see Aurigma, Inc. If you want to replace Aurigma's name with your company name, you can order a private-label version. In this case Aurigma creates a special custom uploader for you. Your company, in its turn, should then purchase a code singing certificate from one of the certificate authorities (e.g. Thawte or VeriSign) and sign the binaries with it.
The topic below explains the steps required for signing a private-label version. You can just ignore this topic if you don't have a private-label version of ActiveX/Java Uploader on your website.
About CAB Files
To make ActiveX Uploader automatically install in Internet Explorer and Internet Explorer 64-bit, you need to pack the
Uploader8.ocx
and Uploader8_x64.ocx
files into the CAB files. The CAB (cabinet) file is a file format developed by Microsoft as a self-installing archive, in particular, for ActiveX controls. To allow installing a CAB file from Internet Explorer, the control, such as ActiveX Uploader, should be embedded into a Web page. For more details about embedding ActiveX Uploader in a Web page see Using Private-label Version of ActiveX/Java UploaderUsing Private-label Version of ActiveX/Java Uploader ASP.NETUsing Private-label Version of ActiveX/Java Uploader PHPUsing Private-label Version of ActiveX/Java Uploader JavaScript.During installation, Internet Explorer downloads the CAB file, extracts the OCX file from it as well as any other files, and registers the control.
Each CAB file should contain an INF file. The INF file contains a description of the archive content. It includes such information as a list of files, which files should be registered, where files should be placed, version information, and so on.
Code Signing
It would be insecure to enable Internet Explorer to download from the Web and install arbitrary ActiveX controls, because malicious people could distribute harmful code. To avoid security problems the browsers usually require controls and other software to be digitally signed using a special code signing certificate which is granted to software vendors by such certificate authorities as VeriSign and Thawte. Certificates ensure that the software being installed was actually developed by the specified vendor.
Though browser settings can be adjusted so that unsigned software can be installed, the default settings and corporate company-wide security policies usually do not allow this.
Walkthrough: Building a CAB File
To build a CAB file, in general, you should follow these steps:
- Create an INF file that lists all files you are going to put into the CAB file (except for the INF file itself). This file should have the same file name as the CAB file. That is, if you create an
EasyUploadTool.cab
, you should name the INF fileEasyUploadTool.inf
. For more details about INF files, see the About INF File Architecture MSDN article. - Sign all the files that will be registered with your digital certificate (that is, RegisterServer key should be set to
Yes
for these files). In our case it is theUploader8.ocx
andUploader8_x64.ocx
files that need to be signed. To sign it you can use thesigntool.exe
utility which is distributed with Microsoft .NET Framework SDK. - Pack files into a CAB file using the
cabarc.exe
utility which is available as a part of the Windows XP Service Pack 2 Support Tools (to download this file click here). If your OS is different from Windows XP you can extract only thecabarc
utility using the following commands: The list of files that should be included into the first CAB file is as follows:Uploader8.ocx
representing the control itself<cabinet name>.inf
containing information about the package
Uploader8_x64.ocx
representing the 64-bit version of the control<cabinet name>.inf
containing information about the package
- Sign the resulting CAB files with your certificate.
Example: Building Uploader8.ocx
Assume you have recompiled ActiveX Uploader and want to put it into
Uploader8.cab
.First, you should create the
Uploader8.inf
file. You can do it in any text editor, for example in Notepad. Copy the following data into it:There are two placeholders in this listing:
- <CLSID> should be replaced with the CLSID of your private-label ActiveX Uploader. Aurigma supplies this parameter with a private-label version. The other way to find out the CLSID of your copy is using the
oleview
utility which is distributed along with Visual Studio (do not forget to runoleview.exe
as administrator at the first time):- Type
oleview.exe Uploader8.ocx
in the Visual Studio command prompt. - In the tree view, select coclass ImageUploader. On the right panel, you will see a piece of IDL code.
- Copy the value of the uuid() attribute from the right panel; this value is the CLSID.
- Type
- <Version> should be replaced with the version of your ActiveX Uploader copy. Aurigma supplies this parameter with a private-label version too. Also, to find out the version of your copy, you can see the properties of the
Uploader8.ocx
file:- Right-click
Uploader8.ocx
. - Select Properties from the context menu.
- Click the Version tab.
- Right-click
Copy the File version value. Note, that you should replace dots with commas. For example, you should specify 8,0,48,0 instead of 8.0.48.0.
NoteFor the 64-bit version of ActiveX Uploader control you should replace the string containing
file-win32-x86=thiscab
with the following one: file=thiscab
.Put this INF file in the same folder with the
Uploader8.ocx
file.Then, create a batch (.bat) file that will build the CAB file from signed files automatically and sign the result. To do that, create a file named
BuildCab.bat
in any text editor and copy the following data into it (do not forget to remove the line breaks):There are several placeholders in this listing:
- <Path to .pvk to .pfx converter> should be replaced with the path to the
pvk2pfx
utility. Typically, it is located in the/Bin
subfolder of the Windows SDK installation folder. - <Path to certs> should be replaced with the path to your SPC and PVK certificate files.
- <Password> should be replaced with the password for your PVK file.
- <Path to signtool> should be replaced with the path to the
signtool
utility. Typically, it is located in the/Bin
subfolder of the Windows SDK installation folder. - <Control name> should be replaced with the name that will be displayed in a browser security dialog.
- <Path to Image Uploader files> should be replaced with the path to the files that will be placed in the CAB file.
- <Path to cabarc> shoud be replaced with the path to the
cabarc
utility. - <Path to resulting CAB> should be replaced with the path of the folder where your CAB file will be saved.
See Also
Manual
- Using Private-label Version of ActiveX/Java UploaderUsing Private-label Version of ActiveX/Java Uploader ASP.NETUsing Private-label Version of ActiveX/Java Uploader PHPUsing Private-label Version of ActiveX/Java Uploader JavaScript
MSDN Articles
Others
Hi,
Well theres lots to learn about how ActiveX controls get installed from this. Microsoft has a site describing how to build these INF files and ActiveX downloads:
http://msdn.microsoft.com/workshop/components/activex/packaging.asp
And this site has an overview of the entire component architecture:
http://msdn.microsoft.com/workshop/delivery/download/overview/entry.asp
Lots to read ... but anyway
If you want to cheat, try this link:
http://www.myitforum.com/articles/1/view.asp?id=3270
It says:
An ActiveX component is usually packaged as a .CAB file. To prepare for distribution, you should first extract the contents of the .CAB file to your distribution point. This usually consists of one .INF file and one or more .DLL files.
On Windows NT and 2000 these files first need to be copied to the client’s 'WINNTDownloaded Program Files' directory. Then you can use your preferred software packaging program to execute the .INF file from the command line using Rundll32.EXE.
Note: Rundll32.EXE can also be used to install Windows optional components from the command line.
Details on the optional command line switches used with Rundll32.EXE can be found in Microsoft’s Internet Explorer 6 Resource Kit documentation, Chapter 17 – Working With .INF Files.
For a simple install that doesn’t require a reboot, the syntax is simply:
%SYS32%Rundll32.EXE %WIN%Downloaded Program FilesComponent.INF
Sounds pretty easy to me :) Let us know if it works.
Rgds
Paul
Well theres lots to learn about how ActiveX controls get installed from this. Microsoft has a site describing how to build these INF files and ActiveX downloads:
http://msdn.microsoft.com/workshop/components/activex/packaging.asp
And this site has an overview of the entire component architecture:
http://msdn.microsoft.com/workshop/delivery/download/overview/entry.asp
Lots to read ... but anyway
If you want to cheat, try this link:
http://www.myitforum.com/articles/1/view.asp?id=3270
It says:
An ActiveX component is usually packaged as a .CAB file. To prepare for distribution, you should first extract the contents of the .CAB file to your distribution point. This usually consists of one .INF file and one or more .DLL files.
On Windows NT and 2000 these files first need to be copied to the client’s 'WINNTDownloaded Program Files' directory. Then you can use your preferred software packaging program to execute the .INF file from the command line using Rundll32.EXE.
Note: Rundll32.EXE can also be used to install Windows optional components from the command line.
Details on the optional command line switches used with Rundll32.EXE can be found in Microsoft’s Internet Explorer 6 Resource Kit documentation, Chapter 17 – Working With .INF Files.
For a simple install that doesn’t require a reboot, the syntax is simply:
%SYS32%Rundll32.EXE %WIN%Downloaded Program FilesComponent.INF
Sounds pretty easy to me :) Let us know if it works.
Rgds
Paul