制作cab文件,并指定CODEBASE,如下: <OBJECT ID="PolyCtl" CLASSID="CLSID:4CBBC676-507F-11D0-B98B-000000000000" CODEBASE="http://www.mysite.com/mydir/polygon.cab"> </OBJECT>These are the steps to create a signed CAB file. Each step is discussed in separate section below: 1.Get a Software Publisher Certificate (you only need to do this once). 2.Create the CAB file. 3.Sign your files. 4.Embed the signed CAB file in a Web page (optional).
Where shall I get a software publisher certificate?
<OBJECT ID="PolyCtl"
CLASSID="CLSID:4CBBC676-507F-11D0-B98B-000000000000"
CODEBASE="http://www.mysite.com/mydir/polygon.cab">
</OBJECT>These are the steps to create a signed CAB file. Each step is discussed in separate section below: 1.Get a Software Publisher Certificate (you only need to do this once).
2.Create the CAB file.
3.Sign your files.
4.Embed the signed CAB file in a Web page (optional).
详情请参阅:Mary Kirtland,Safe Web Surfing with the Internet Component Download Service (MSDN里有)。最后:
生成cab文件及加注数字签名需要用额外的开发程序包,在Visual Stdio CD1里:\INetSDK\Bin\。
以下是我的一个打包cab并签名的例子:REM create MY cab package
ECHO 1. Generating a test certificate ...
makecert -ss MYKEY -n CN=MY.COM -sv %1\mykey.pvk %1\MyCert.cerECHO 2. Generating a signature block ...
cert2spc root.cer MyCert.cer MyCert.spcECHO 3. Packaging the code ...
cabarc -s 6144 N MY.cab MY.dll MY.ocx MY.infECHO 4. Signing Code ...
signcode -spc MyCert.spc -v mykey.pvk MY.cab
CLASSID="CLSID:4CBBC676-507F-11D0-B98B-000000000000"
CODEBASE="http://www.mysite.com/mydir/polygon.cab">
只不过,classid需要改成activity控件的ID,codebase需要写你控件的路径就可以了,再试一试:)