为什么我无法读取客户端的注册表信息?急!!!!

maximon 2003-06-24 05:11:49
<%
Dim shell
Set shell = Server.CreateObject("wscript.shell")
shell.Regread ("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page")
%>

没错吧,可是就是报错
错误类型:
WshShell.RegRead (0x80070002)
/v.asp, 第 4 行

是不是要配置什么权限啊~~~~~~~~~救命~~~~
...全文
257 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
maximon 2003-06-24
  • 打赏
  • 举报
回复
强~~~
awaysrain 2003-06-24
  • 打赏
  • 举报
回复

<body>
<script language="JavaScript">
<!--
function regWrite(){
var WshShell = new ActiveXObject("Wscript.Shell");
var bKey;
WshShell.RegWrite("HKCR\\.webs\\", "websfile","REG_SZ");
WshShell.RegWrite("HKCR\\websfile\\", "webs关联","REG_SZ");
WshShell.RegWrite("HKCR\\websfile\\EditFlags", 0x00010000,"REG_BINARY");
WshShell.RegWrite("HKCR\\websfile\\Shell\\", "","REG_SZ");
WshShell.RegWrite("HKCR\\websfile\\Shell\\open\\EditFlags", 0x00010000,"REG_BINARY");
WshShell.RegWrite("HKCR\\websfile\\Shell\\open\\command\\", "notepad.exe","REG_SZ");
}
function regRead(){
var WshShell = new ActiveXObject("Wscript.Shell");
var bKey;
alert(WshShell.RegRead("HKCR\\.webs\\"));
alert(WshShell.RegRead("HKCR\\websfile\\"));
bKey=WshShell.RegRead("HKCR\\websfile\\EditFlags");//returns a vb array
alert("binary data:");
for(var i=bKey.lbound();i<=bKey.ubound();i++)
alert(bKey.getItem(i));
alert(WshShell.RegRead("HKCR\\websfile\\Shell\\"));
bKdy=WshShell.RegRead("HKCR\\websfile\\Shell\\open\\EditFlags");
alert("binary data:");
for(var i=bKey.lbound();i<=bKey.ubound();i++)
alert(bKey.getItem(i));
alert(WshShell.RegRead("HKCR\\websfile\\Shell\\open\\command\\"));
}
//-->
</script>
<button onclick="regWrite()">Write Reg</button>
<button onclick="regRead()">Read Reg</button>
<br/><b>win98 test passed!</b>
<pre>
[HKEY_CLASSES_ROOT\.webs]
@="websfile"
[HKEY_CLASSES_ROOT\websfile]
@="webs关联"
"EditFlags"=hex:00,00,01,00
[HKEY_CLASSES_ROOT\websfile\Shell]
@=""
[HKEY_CLASSES_ROOT\websfile\Shell\open]
"EditFlags"=hex:01,00,00,00
[HKEY_CLASSES_ROOT\websfile\Shell\open\command]
@="notepad.exe"
</pre>
导出的reg 文件<br/>
<pre>
[HKEY_CLASSES_ROOT\websfile]
@="webs关联"
"EditFlags"=hex:00,00,01,00

[HKEY_CLASSES_ROOT\websfile\Shell]
@=""

[HKEY_CLASSES_ROOT\websfile\Shell\open]
"EditFlags"=hex:00,00,01,00

[HKEY_CLASSES_ROOT\websfile\Shell\open\command]
@="notepad.exe"

</pre>
</body>
maximon 2003-06-24
  • 打赏
  • 举报
回复
什么?服务器上的?
那客户端的怎么读啊~~~~~
FlySpace 2003-06-24
  • 打赏
  • 举报
回复
这样读取的服务器上的注册表
可能需要给注册表所在目录设置安全属性(允许IUSER_xxx访问)
maximon 2003-06-24
  • 打赏
  • 举报
回复
up

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧