当前位置: 代码迷 >> vbScript >> VBScript脚本访问注册表,高手看过来,该如何处理
  详细解决方案

VBScript脚本访问注册表,高手看过来,该如何处理

热度:9022   发布时间:2013-02-26 00:00:00.0
VBScript脚本访问注册表,高手看过来
很简单的一个脚本
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<script language=vbscript >
Function readreg
Dim OperationRegistry 
Set OperationRegistry=CreateObject("WScript.Shell")  
Dim Read_Data1
Read_Data1=OperationRegistry.RegRead("HKLM\SOFTWARE\Tns\LastTime") 

End Function
</script>
<body>
<input type="button" value="Test" onclick ="readreg"></input>
</body>

</html>
一打开这个网页,就报错:
An Activex control on this page might be unsafe to interact with other parts of the page.Do you want to allow this interaction?
按确认,程序能继续运行
如何把这个提示去掉
鉴于以前没人能解决这个问题,分给的不高,如果解决,分不够,再加

------解决方案--------------------------------------------------------
解决不了,我已经降低了安全性还是不行,IE做了限制。
------解决方案--------------------------------------------------------
问题解决了吗,再顶
------解决方案--------------------------------------------------------
问题解决了吗,再顶
------解决方案--------------------------------------------------------
It's a problem that is puzzling me. I've also written a vbscript embedded in html and get the same message. How did you solve it please? I've searched the internet and tried setting all settings to lowest security. Have I missed something?
------解决方案--------------------------------------------------------
如果不是本地的,把当前站点加到"可信站点"然后更改"可信站点"的安全级别为"低"再试试.
如果是本地的,在"internet选项"里"高级"下的"允许活动内容在我的计算机上的文件中运行"勾上,重启IE.
不过,若是本地的,不如更改文件扩展名为hta.
------解决方案--------------------------------------------------------
能力有限期待高手,帮顶了
  相关解决方案