R – Non-Admin registration of ActiveX Controls

activexatldeploymentinternet-explorer-8registration

according to Non-Admin ActiveX Controls, it is possible to register activeX under current user (that will not require admin right during the installation).
I have crated ATL project (VS2008, native) and added some ATL Control that does nothing.

I created an inf file:

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

[Add.Code]
     Batman.dll=Batman.dll

[Deployment]
    InstallScope=user

[Batman.dll]
    file-win32-x86=thiscab
    clsid={2C10EC82-2BF3-4ED5-8AFC-E5146C672B3D}
    FileVersion=1,0,0,1
    RegisterServer=yes

Add both the dll and inf into CAB and signed it.
I load an ActiveX from simple html page

<OBJECT ID="sampleControl" CLASSID="CLSID:2C10EC82-2BF3-4ED5-8AFC-E5146C672B3D" CODEBASE="Batman.cab#Version=1,0,0,1"></OBJECT>

And it does not register it under current user anyhow.

I case I specify InstallScope=machine there is not problem the activeX is loaded.

Any idea what should be done ?

Thanks

Best Answer

I encounter the same problem, but the strangest part is, it's ok with Apache Server while not with Tomcat Server.

Finally, I found it also related to Web Server setting.

Your Web Server MUST support correct mime type mapping. If you test with Tomcat, add following to web.xml:

<mime-mapping>
    <extension>cab</extension>
    <mime-type>application/vnd.ms-cab-compressed</mime-type>
</mime-mapping>
Related Topic