views:

1154

answers:

4

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'&gt;&lt;/object&gt;

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?

A: 
  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

Eugene
A: 

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.

A: 

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
vikasde
A: 

Hi Vikas,

am facing similar issue.... couldn't get after followed the same instructions....

I have created classlibrary/windowsformscontrollibrary and created websetup file. prepared the INF file and executed CABARC as u mentioned above. after generating CAB files copied the CAB file to location of my .aspx page folder.... but controls display as usaul before as empty with some color mark on top-left corner. can help me with ur exp in this issue.

thanks madhav

madhav