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?
Hope it helps…
Packaging ActiveX Controls
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With