登陆 注册
您的位置:
莫非网 -> 网络编程 -> ASP教程 -> 编程内容

ASP读写注册表

[ 作者:佚名  来源:不详  发布时间:2008-5-5 18:11:52    收藏此页到站长网摘]

一个例子:

 

以下为引用的内容:
<%Dim ReadComputerName
Set ReadComputerName=CreateObject("WScript.Shell")
Dim ComputerName,RegPath
RegPath="HKLM\System\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName"
ComputerName=ReadComputerName.RegRead(RegPath)
response.write "计算机名为"&ComputerName %>

第二个读的代码

以下为引用的内容:
<%
Dim zcbpath
zcbpath=request.form("zcbpath")
if zcbpath<> "" then
'zcbpath = "HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\COMMONFILESDIR"
Set objShell = CreateObject("WScript.Shell")
Response.Write objShell.RegRead(zcbpath)
end if
%>
<form action="zcb.asp" method=post>
注册表键值<input type=text name=zcbpath id=zcbpath>
<input type=submit>
</form>

责任编辑:莫非
】 【打印】 【关闭
图文新闻
关于ASP读写注册表 评论(评论只代表网友观点)
[查看评论]
用户名
分 值 100分 85分 70分 55分 40分 25分 10分 0分
说 明
  (注“”为必填内容。)
·用户发表意见仅代表其个人意见,并且承担一切因发表内容引起的纠纷和责任
·请客观的评价您所看到的资讯,提倡就事论事,杜绝漫骂和人身攻击等不文明行为
·本站内容均来自网络如果有版权和利益的纷争请及时联系我们,联系电话:010-51724886
·为了丰富本真内容如果有好的原创想在莫非网刊出请投稿,投稿信箱:post@mofei.com.cn

内容搜索

热门编程

最新编程

推荐编程