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
查看全文
相关阅读:
97. Interleaving String (String; DP)
140. Word Break II (String; DP,DFS)
139. Word Break (String; DP)
120. Triangle(Array; DP)
132. Palindrome Partitioning II (String; DP)
91. Decode Ways (Array; DP)
45. Jump Game II (Array; Two-Pointers,Greedy)
LeetCode Excel Sheet Column Number
LeetCode Factorial Trailing Zeroes
LeetCode SQL: Second Highest Salary
原文地址:https://www.cnblogs.com/ding0910/p/682882.html
最新文章
crawler_微信采集方案
crawler_爬虫代理方案
maven_修改setting ,改为自己私服或者OSC开源中国 [为解决sqlite-jdbc 在中央仓库找不到]
php_linux_ubuntu_安装mysql_apache_php
php_windows搭建
linux_ubuntu12.04 安装 svn
linux_ubuntu12.04 卸载和安装mysql、远程访问、not allowed
三、curator recipes之共享的可重入读写锁
二、curator入门
一、window下zookeeper独立部署
热门文章
Java APi 之 RMI远程方法调用
Java API 之 动态代理
https如何工作
redis(9)集群搭建
redis(8)集群简介
redis(7)LRU缓存
redis(6)lua脚本
87. Scramble String (String; DP)
115. Distinct Subsequences (String; DP)
72. Edit Distance (String; DP)
Copyright © 2011-2022 走看看