JavaScript检查ActiveX控件是否已经安装过

检测注册表中ActiveX控件是否被注册 window.onload=function() {            //在系统提示用户是否允许交互前判断当前控件是否加载,通过此属性判断当前是否注册了COM组件          var isReg = true;          //通过获取注册表属性得到安装路径          var hkey_root,hkey_path,hkey_key,path; 阅读详情
 

JavaScript检查ActiveX控件是否已经安装过


function detectPlugin(CLSID,functionName)
{
var pluginDiv = document.createElement("<div id=\"pluginDiv\" style=\"display:none\"></div>")
document.body.insertBefore(pluginDiv);
pluginDiv.innerHTML = '<object id="objectForDetectPlugin" classid="CLSID:'+ CLSID +'"></object>';
try
{
if(eval("objectForDetectPlugin." + functionName) == undefined)
{
pluginDiv.removeNode(true);//删除pluginDiv及其所有的子元素
return false;
}
else
{
pluginDiv.removeNode(true);//删除pluginDiv及其所有的子元素
return true;
}
}
catch(e)
{
return false;
}
}
这是通用的方法,只需要把唯一的Activex的clsid和任意一个属性或方法名传进来就可以判断了。(找了两个小时才找到 -_-!)

 
 
  1. function detectPlugin(CLSID,functionName)   
  2. {   
  3.     var pluginDiv = document.createElement("<div id=\"pluginDiv\" style=\"display:none\"></div>")   
  4.     document.body.insertBefore(pluginDiv);   
  5.     pluginDiv.innerHTML = '<object id="objectForDetectPlugin" classid="CLSID:'+ CLSID +'"></object>';   
  6.     try  
  7.     {   
  8.         if(eval("objectForDetectPlugin." + functionName) == undefined)   
  9.         {   
  10.             pluginDiv.removeNode(true);//删除pluginDiv及其所有的子元素   
  11.             return false;   
  12.         }   
  13.         else  
  14.         {   
  15.             pluginDiv.removeNode(true);//删除pluginDiv及其所有的子元素   
  16.             return true;   
  17.         }   
  18.     }   
  19.     catch(e)   
  20.     {   
  21.         return false;   
  22.     }   
  23. }  
html中js加载ActiveX控件启动本地程序 资源中包括一下很详细的说明文档、一个自定义OCX控件、以及这个控件的源代码(VS2010)。 说明文档中介绍了两种方法,一个是自定义Ocx控件,一个是使用Wscript.Shell对象。 立即下载

相关推荐

别再死记硬背了!用Python可视化带你直观理解柯西收敛定理(附NumPy代码)

本文通过Python可视化技术,结合NumPy和Matplotlib,直观展示柯西收敛定理的动态过程。文章提供了完整的代码实现,帮助读者从抽象数学定义过渡到具象理解,特别适合数学学习者和Python开发者。通过热力图和交互式参数探索,读者可以清晰观察数列收敛特性,提升数学分析的学习效率。

weixin_28465009的博客 185

Javascript判断是否有ActiveX控件的两种方法

在网页中使用ActiveX控件是这么添加的 &lt;object classid="AB-56-788889-H" id="testActiveX" width=100px&gt; &lt;/object&gt; 查询资料,发现有两种方法 一、Dom文档判断 &lt;script&gt; if(document.all.testActiveX.object==null) { a...

u010518621的博客 1772

下水管道损坏检测数据集总结

下水管道损坏检测数据集包含 6708 张图像,为下水管道损坏情况的检测提供了丰富的数据基础。该数据集提供了 YOLO 和 VOC 两种常见的标注方式,方便不同需求的使用者进行模型训练和研究。

crz1336768325的博客 870

如何在Web上判断是否已经安装了某个ActiveX控件

1. 用JavaScript检测系统中是否已经安装了某个ActiveX控件 try { var ax = new ActiveXObject("控件名称"); alert("已安装"); } catch(e) { alert("未安装"); }如果组件不是自己编写的,要确定控件名称,首先要知道控件的CLSID。每个COM组件都会对应一个CLSID,可在IE管理加载项中获得

清风小阁 1万+

Clion+platformIO开发ESP32时找不到lib文件中引入第三方库的头文件(头文件下有波浪线),实际编译是成功的解决方法

Clion+platformIO开发ESP引入第三方库文件编译器无法找到.h文件但编译成功

zs5218的博客 1852

LangGraph实战:用Python异步构建智能客服多轮对话系统(附完整代码)

本文详细介绍了如何使用LangGraph框架和Python异步编程构建一个高性能的智能客服多轮对话系统。通过将对话流程建模为有向图,结合thread_id实现多用户对话隔离,并利用异步节点提升系统并发处理能力,有效解决了传统客服系统上下文遗忘与高并发瓶颈问题。文章提供了从环境搭建、状态管理、异步优化到复杂业务逻辑与部署的完整实战代码。

weixin_29055137的博客 149

通过javascript判断本地是否安装了客户端

我们都知道js被设计为不可访问本地资源,因此理论上js无法知道本地是否安装了特定程序。但是凡事无绝对,对于IE,给出如下两种思路:     1 ActiveX        在页面中用js去new一个指定的ActiveX对象,如果抛出异常,则说明目标客户端没有安装。这种方法的问题在于容易弹出安全性提示,但是经过我的试验,编写ocx时实现isafeobject接口并在注册表中写入特定键值,就可以

gemo的专栏 4147

非线性动力学_用MatCont分析非线性动力学方程组(一)

写在前面:笔者打算写两到三篇系列文章介绍MatCont,此为第一篇《用MatCont分析非线性动力学方程组(一)》。MatCont是一个基于Matlab而开发的免费工具包,专门用来做非线性动力学模型分叉、向量场、周期性等分析,符号(连续性)运算和数值(离散性)运算均适用。该工具的开发及研究项目由比利时Ghent大学的Willy Govaerts教授、荷兰Utrecht大学的Yuri Kuznets...

weixin_39700215的博客 2768

*JavaScript检查ActiveX控件是否已经安装过

function detectPlugin(CLSID,functionName){ var pluginDiv = document.createElement("<div id=\"pluginDiv\" style=\"display:none\"></div>") document.body.insertBefore(pluginDiv); plu...

weixin_30586257的博客 112

公文派2025:免费社区版重大安装更新!

距离上一次更新已经过去了将近一年的时间,今天我们带来了全新的免费2025社区版,该版本也是目前最新的版本,无需授权即可使用所有的功能。

似最初 1963

S4 Hana SD -信贷管理 - 02

在S4版本中,客户的信用管理数据在事务代码BP维护,业务伙伴角色是UKM000。在维护过程中,我们并不能直接输入信贷控制范围这个组织架构,而是需要输入一个信用段,并且在信用段的维度下去维护相应信用管理数据。对于信用段,可以分为主信用段(信用段是0000)和其他临时信用段,我们可以通过配置把次级信用段的客户信贷负债汇总到主信用段。当然,在后台也有配置,会把信用段和信贷控制范围这两者进行关联.3.2SPROIMG > 财务供应链管理 > 信用管理 > 信贷风险监视 > 主数据 > 创建信用段。

weixin_46525734的博客 1967

利用javascript判断浏览器是否已经安装ActiveX控件和是否禁止运行ActiveX控件

从微软给 IE 打上 SP2以后,当IE在打开一些含有 ActiveX 控件的网页是,不再像以前那样,弹出提示框,让用户选择是否安装控件;现在默认情况下给隐藏起来,普通用户根本不知道是怎么回事。公司产品同样也遇到这样的问题,唯一的办法就是将控件做成一个 exe 文件,供用户下载手动安装注册;这样就需要做一个检测,检测要是用户没有安装控件的话就提示用户用户下载安装,要是安装了就直接转到相关页面。想了

1181

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

用Javascript判断IE是否已经安装Activex插件和禁用ActiveX

script>function DetectActiveX(){try {var comActiveX = new ActiveXObject(V2.V2Ctrl.1); // 判断IE是否已经安装视频插件} catch (e) {return false;}return true;} if(DetectActiveX()==true){ ale

狂人山庄 3766

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

js判断ActiveX控件是否安装

Javascript脚本 [javascript] view plaincopy "text/javascript"  language="JavaScript">       alert("检查ojs判js判断ActiveX控件是否安装断ActiveX控件是否安装cx是否安装");                     var New

awen_sky的专栏 671

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

检测控件是否安装的两种方式:

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> html xmlns="http://www.w3.org/1999/xhtml"> head> meta http-equiv="Content-Ty

familyGo的专栏 1279

发布C#编写的ActiveX控件

1. 用JavaScript检测系统中是否已经安装了某个ActiveX控件try{varax=newActiveXObject("控件名称");alert("已安装");}catch(e){alert("未安装");}发布1、打开cmd,进入C:/windows/system32,输入iexpress。打开cab制作工具2、单击“下一步...

weixin_33720452的博客 91

第三十五章 Javascript 检测是否安装了 Silverlight

当前版本的Internet Explorer视Silverlight作为一种 ActiveX 控件。因此,为了确定是否安装了Silverlight ,可以尝试使用Javascript 创建这个 ActiveX。如果创建ActiveX控件失败,可以认为 Silverligh

409

网页启动客户端程序代码

摘自:http://blog.youkuaiyun.com/liyun919/archive/2009/11/13/4807958.aspx 1、 需求描述:项目由网页部分及客户端大厅程序部分组成,网页上有一个进入大厅按钮,如果客户端安装了,点击按钮直接打开客户端程序,如果未安装则提示消息提醒安装客户端程序。 类似于QQ游戏大厅、联众游戏大厅的打开,QQ的强制聊天功能。 2、首先要实现如果客户端安装了,...

龙卷风之家 504

JavaScript监测ActiveX控件是否已经安装过的代码

function detectPlugin(CLSID,functionName) { var pluginDiv = document.createElement("") document.body.insertBefore(pluginDiv); pluginDiv.innerHTML = + CLSID +">; tr

飞翔的专栏 761
上一篇: 如何在COM组件接口方法中返回一个字符串给js?
下一篇: web上用Activex控件开发步骤(MFC) 博客分类: HTML & AJAX
msbbc
博客等级 码龄18年 39粉丝 8原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值