惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 【当耐特】
Help Net Security
Help Net Security
P
Proofpoint News Feed
J
Java Code Geeks
爱范儿
爱范儿
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Full Disclosure
Google DeepMind News
Google DeepMind News
H
Help Net Security
G
Google Developers Blog
Jina AI
Jina AI
Vercel News
Vercel News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
Lohrmann on Cybersecurity
S
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
Security Archives - TechRepublic
Security Archives - TechRepublic
阮一峰的网络日志
阮一峰的网络日志
N
News and Events Feed by Topic
GbyAI
GbyAI
B
Blog
O
OpenAI News
博客园_首页
Cisco Talos Blog
Cisco Talos Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
TaoSecurity Blog
TaoSecurity Blog
腾讯CDC
MongoDB | Blog
MongoDB | Blog
M
MIT News - Artificial intelligence
C
Cybersecurity and Infrastructure Security Agency CISA
Cyberwarzone
Cyberwarzone
Webroot Blog
Webroot Blog
Simon Willison's Weblog
Simon Willison's Weblog
Y
Y Combinator Blog
C
Cisco Blogs
A
Arctic Wolf
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
AI
AI
W
WeLiveSecurity
aimingoo的专栏
aimingoo的专栏
The Register - Security
The Register - Security
Project Zero
Project Zero
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
Blog — PlanetScale
Blog — PlanetScale

博客园 - cosophy

C++单例模式 enable all verbs to application hosting on IIS 7.5 and using Asp.net 4.0 如何正确使用异常 ArcGIS 10 FlickrOnMap - A Silverlight Application Developed by Flickr Web API and ArcGIS Server API for Silverlight 关于Arcgis Server REST服务无法使用: Cannot acces http://localhost/arcgis/rest/services - cosophy Installing ArcGIS 9.3 On Microsoft Windows 7 SQL Server 2005 Express混合模式登录设置 List of REST Resources Enable SSL On IIS 7.0 Using Self-Signed Certificates 缅怀遥感地学之父、三院院士陈述彭先生 RSS Disabled: IE 7.0 could not read the RSS Feeds in the Feed List 关于地图投影与坐标系统 WCF:Configure svc MIME type on Vista IIS 7.0 ArcGIS Desktop 9.3 安装、破解 NSDTF-DEM格式数据 [ERR0134] Requested Service is not available 的解决方法 ERDAS 9.1 破解文件下载 修改ASP.NET成员提供程序,配置简单密码规则创建用户
ActiveX控件cab打包、Web嵌入、自动升级攻略
cosophy · 2011-09-14 · via 博客园 - cosophy

1.       打包

ocx控件及DLL等依赖文件打包成CAB

1)打包前,先建立一个inf文件以提供安装信息,inf文件的结构如下:

[version]

signature="$CHINA$"

AdvancedINF=2.0

[Add.Code]

WebVideoActiveX.ocx=WebVideoActiveX.ocx

midas.dll=midas.dll

……

[WebVideoActiveX.ocx]

file-win32-x86=thiscab  

RegisterServer=yes  

clsid={FA90127B-CF0D-4B63-B327-5221B108285C}  

DestDir=11

FileVersion=2,0,0,0

[midas.dll]

file-win32-x86=thiscab  

RegisterServer=yes                       

DestDir=11  

FileVersion=7,0,4,453

……

其中,[version][Add.Code]项是必须的[version]为该inf文件的版本信息,[Add.Code]是需要安装的控件和依赖文件,格式如上;后面的是每个安装文件具体信息,包括:FileVersion文件版本、DestDir安装目录(11即默认的system32目录)、RegisterServer是否需要注册、file-win32-x86代表x86平台、thiscab意指包含该INFCAB文件、clsid是控件的CLSID

2)使用Windows自带工具IExpresssystem32下)进行CAB包制作:

inf文件、ocx控件文件、DLL等依赖文件全部添加进去,注意选中 Store files using Long File Name inside Package”。

2.        页面嵌入

 使用<object>标签进行嵌入,格式如下:

 <OBJECT ID="CPServer" CLASSID=" FA90127B-CF0D-4B63-B327-5221B108285C "

       HEIGHT=0 WIDTH=0 ALIGN=LEFT

CODEBASE="ocx /evS1300.cab#Version=2,0,0,0">

  </OBJECT>

其中:CLASSIDocx控件的CLSIDCODEBASE为该控件(cab)的存放位置,version为控件的版本号(即ocx文件的版本)。

3.        版本升级

若要对控件进行升级,需将更新的文件重新打包,并更新inf中相应文件的版本号,以及网页中嵌入控件(codebase中)的版本号。

这样,用户在重新打开页面时,即可自动升级安装控件。

4.        使用说明

在客户端,对于未签名的ActiveX控件,需要对IE进行相关设置才可以下载并自动安装。

在【Internet选项>安全>Internet>自定义级别>ActiveX控件和插件】下:将【下载未签名的ActiveX控件】改为提示或启用。 

或先将相应网址加入信任区域,对信任区域的安全进行以上设置。

相关参考:

http://www.cnblogs.com/chinhr/archive/2008/02/25/1080775.html

http://blog.csdn.net/qcdn/article/details/2156655

http://zhanyonhu.blog.163.com/blog/static/1618604420083308494707/