How to build a signed .cab file that runs msi

When using an activeX in a webpage we would probably run into this syntax:

<OBJECT CLASSID="clsid:dcf0768D-ba7a-101a-b57a-0000c0c3ed5f"
ALIGN="CENTER" WIDTH=270 HEIGHT=26 ID="T1"><PARAM NAME="Interval" VALUE=1000>
<PARAM NAME="Enabled" VALUE=1></OBJECT>

Windows will first check for the existence of the class in “clsid” – if this class is not available, it will open up the CabInstaller.cab file (which is like rar or zip archives), execute directives written in a special .INF file and then try to load the class again.

The cab file can do many things but the simplest configuration would probably look like this:

[version]
signature="$CHICAGO$"
AdvancedINF=2.0

[Setup Hooks]
hook1=hook1

[hook1]
run=%EXTRACT_DIR%\test.exe /S

Edit an inf file and copy this content with the appropriate changes.

To create a cab file use the utility: cabarc.exe

cabarc.exe n CabInstaller.cab test.exe CabInstaller.inf

To sign on this cab file use:

signtool signwizard

Post a Comment

Previous Post Next Post