zoukankan
html css js c++ java
ActiveX下载(JavaScript实现,含setup.bat文件,创建自解压文件,ActiveX控件存在判断与自定义下载页面)
ActiveX下载(JavaScript实现).rar
//ActiveX控件信息
<
OBJECT
id
="FileClient"
classid
="clsid:9627E9EB-3636-42AF-80C2-3CE2E5541930"
codeBase
="FileClient.ocx#Version=1.2.0.9"
></
OBJECT
>
//创建自解压文件
1。选中FileClient.ocx和setup.bat文件
2。右键单击选择'添加到压缩文件'
3。勾选'创建自解压格式压缩文件',文件后缀名自动变成.exe
4。选择'高级'标签,单击'自解压选项'
5。在自解压选项中,填写安装程序'解压后运行'->填入'setup.bat'
6。选择自解压选项的'模式'标签,勾选'解包到临时文件夹'项
7。确定即可
================================
//// test.html ////
<
body
id
="main_content"
onload
="initActiveX();"
>
<
DIV
ID
="ttt"
STYLE
='display:none;'
></
div
>
</
body
>
</
html
>
<
script
type
="text/javascript"
>
<!--
//
ActiveX下载
function
initActiveX()
{
var
pos
=
0
;
var
path
=
""
;
var
codebasepath
=
"
ActiveX/FileClient.ocx#Version=1.2.0.9
"
;
var
dlurl
=
"
ActiveX/msg.html
"
;
try
{
ttt.innerHTML
=
(
"
<OBJECT classid=clsid:9627E9EB-3636-42AF-80C2-3CE2E5541930 id=FileClient style=\
"
HEIGHT:
100
%
; WIDTH:
100
%
\
"
/>
"
);
aFileClient
=
document.getElementById(
"
FileClient
"
);
aFileClient.GetOcxVersion();
}
catch
(e)
{
alert(
"
您尚未安装需要的ActiveX控件,请下载并安装该ActiveX控件!
"
);
window.location.href
=
dlurl;
}
}
//
-->
</
script
>
//// ActiveX/msg.html ////
<
HTML
>
<
head
>
<
meta
http-equiv
="Content-Type"
content
="text/HTML; charset=GB2312"
>
<
title
>
下载ActiveX控件
</
title
>
</
head
>
<
link
type
="text/css"
rel
="stylesheet"
href
="../css/globe-base.css"
>
<
body
id
="main_content"
>
<
table
class
="common_table"
>
<
tr
>
<
td
class
="head"
>
<
span
id
="nav"
>
请在此下载ActiveX控件
</
span
>
</
td
>
</
tr
>
<
tr
>
<
td
class
="main"
style
="padding:6 0 6 12"
height
=50
valign
="top"
>
<
table
width
=100%
border
=0
>
<
tr
>
<
td
class
="p9line21"
>
您的浏览器未能自动安装组件,可能是因为您点击了否,或者您的浏览器安全设置。您还可以下载我们提供的安装包,然后在本地执行安装。
<
BR
>
<
a
href
="FileClientSetup.exe"
><
b
><
font
color
=red
>
点击这里下载ActiveX控件
</
font
></
b
></
a
>
下载完毕后执行即可。
</
td
>
</
tr
>
</
table
>
</
td
>
</
tr
>
</
table
>
</
body
>
</
HTML
>
//// setup.bat ////
Regsvr32 /u /s %windir%\system32\FileClient.ocx
Del %windir%\system32\FileClient.ocx
Copy FileClient.ocx %windir%\system32\FileClient.ocx
Regsvr32 /s %windir%\system32\FileClient.ocx
Del FileClient.ocx
Del FileClient.inf
Echo off
Cls
Echo *********************************************************
Echo *********************************************************
Echo *** ***
Echo *** ***
Echo *** Setup is succeeded! Press any key to close it! ***
Echo *** ***
Echo *** ***
Echo *********************************************************
Echo *********************************************************
Pause
Echo *********************************************************
Del setup.bat
查看全文
相关阅读:
列表常用方法及演示
print >> 重定向
简单字符串过滤练习
None,Python 的 Null 对象,布尔值
Time模块简单学习
str()与repr(),input()与raw_input()
布尔数,__nonzero__()
字符串内建函数
标准类型内建函数
客户端precommit hook参数
原文地址:https://www.cnblogs.com/ding0910/p/682882.html
最新文章
正试图在 os 加载程序锁内执行托管代码,不要尝试在 DllMain 或映像初始化函数内运行托管代码
购物车的两种实现方式
上传图片生成缩略图
.net调用存储过程分页
删除数据库重复记录
.net 简单分页代码
过滤关键字
个人收藏实用代码
asp.net删除文本编辑器上传的图片
网站二级域名用asp.net 2.0的实现方案
热门文章
超出最大连接数问题解决?
ajax 以及控件源码输出
res://c:\windows\system32\shdoclc.dll/dnserror.htm 问题解决
如何编译Lua
SQLServer2005 备份语句
ajax 以及控件源码输出
帽子智力题
关于 windows 集成验证
SQLServer2005 建立新的用户连接数据库
序列常用内建函数
Copyright © 2011-2022 走看看