Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create CAB file for ActiveX installation for IE

I created a cab file that contains my activex using CABARC.exe. I also created an .inf file. My inf file looks like this:

[version]
    signature="$CHICAGO$"
    AdvancedINF=2.0
[Add.Code]
    MySetup.exe=MySetup.exe
[MySetup.exe]
    file-win32-x86=thiscab
    clsid={49892510-B520-4b35-8ADF-57084DD2F717}

My html looks like this:

<object name="secondobj" style='display:none' id='TestActivex'  
 classid='CLSID:49892510-B520-4b35-8ADF-57084DD2F717' 
 codebase='http://myurl/MySetup.cab#version=1,0,0,0'></object>

I created the CABARC using the following commmand:

C:\tools\Cab\BIN>CABARC.EXE N MySetup.cab MySetup.msi setup.inf

I also added http://myurl to the trusted sites. Now the first time I opened the html page in IE, I saw a yellow bar, which I accepted. However it never installed the activex control. I dont see the installation in my program files nor can I see anything in the event logs or in the temporary download folder or in the "manage add-ons". Now everytime I open the webpage in IE, I do not see the yellow bar anymore.

Can anybody help me out here please?

like image 353
vikasde Avatar asked Dec 11 '09 16:12

vikasde


3 Answers

  1. It seems to me you are packing msi installer instead of ActiveX control.
  2. When you extract your control from MSI installer and pack it into CAB, don’t forget to add it’s version to the INF file.

Hope it helps…

Packaging ActiveX Controls

like image 52
Eugene Avatar answered Oct 14 '22 17:10

Eugene


VS 2008 provides an excellent CAB Project. You can find it under Other project types / Setup and deployment / CAB project.

For simple CAB projects you just need to add your component project output.

If you need also to sign your CAB you must edit project properties adding the post build signtool.exe command, but once you are able to sign the component via cmd line you just need to copy the command line to post build event. Using $(ProjectDir) macro may help to generalize the process for automated build.

like image 1
user162912 Avatar answered Oct 14 '22 17:10

user162912


It looks like my .inf was off. Here is what worked for me:

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

[Setup Hooks]
hook1=hook1

[hook1]
run=msiexec.exe /i "%EXTRACT_DIR%\MySetup.msi" /qn

To make the cab:

CABARC.EXE N MyActiveX.cab MySetup.msi setup.inf
like image 1
vikasde Avatar answered Oct 14 '22 17:10

vikasde