ASP中读写注册表
作者:佚名 文章来源:网络转载 更新时间
:2007-11-26 1:01:32
一个例子:
<%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中使用Include的一些问题
[转帖]Asp中常用的时间函数
在ASP中用递归算法遍历硬盘上的目录和文件
在ASP中使用“Request”时应注意的问题
在asp中通过getrows实现数据库记录分页的一段代码
树型结构在ASP中的简单解决
ASP中使用Session变量的优缺点
在ASP中使用SQL语句之11:记录统计
在ASP中使用SQL语句之12:连接
ASP中FSO对象对IIS WEB服务器数据安全的威胁及对策
【发表评论】【打印此文】【关闭窗口】【点击数: 】
<%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中使用Include的一些问题
[转帖]Asp中常用的时间函数
在ASP中用递归算法遍历硬盘上的目录和文件
在ASP中使用“Request”时应注意的问题
在asp中通过getrows实现数据库记录分页的一段代码
树型结构在ASP中的简单解决
ASP中使用Session变量的优缺点
在ASP中使用SQL语句之11:记录统计
在ASP中使用SQL语句之12:连接
ASP中FSO对象对IIS WEB服务器数据安全的威胁及对策
【发表评论】【打印此文】【关闭窗口】【点击数: 】
★好玩的休闲小游戏★
网友评论:
数据载入中,请稍后……
