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
查看全文
相关阅读:
java (取文本中间)字符串之间的文本
Mysql数据库中text还是不够
java读取网页内容
controller to controller
农历类
java.lang.RuntimeException: com.google.inject.CreationException: Unable to create injector, see the following errors
Java中List集合去除重复数据的方法
idea启动tomcat的中文乱码问题
idea局域网调试 can accept external connection不可勾选
Mysql JDBC Url参数说明useUnicode=true&characterEncoding=UTF-8
原文地址:https://www.cnblogs.com/ding0910/p/682882.html
最新文章
根据不同的分辨率,加载不同的CSS样式文件
redis整合
js读写文件
maven爆红 无法下载 或maven 不报错但是jar没有进来
hibernate 抽取工具类
hibernate01
thymeleaf表达式爆红问题
实现Runnab接口
多线程下载图片实例
markdown
热门文章
弹出式侧边栏
E2EE 学习实例笔记
易语言简单api
@RequestMapping接口动态参数
jsp条件判断
引入bootstrap的正确姿势
ajax返回boolean的坑
mybatis xml like
img 圆角
java关于用request获取路径
Copyright © 2011-2022 走看看