ASP能读写注册表
类别: ASP教程
一个例子:
<%Dim ReadComputerName
Set ReadComputerName=CreateObject("WScript.Shell")
Dim ComputerName,RegPath
RegPath="HKLMSystemCurrentControlSetControlComputerNameComputerNameComputerName"
ComputerName=ReadComputerName.RegRead(RegPath)
response.write "计算机名为"&ComputerName %>
第二个读的代码
<%
Dim zcbpath
zcbpath=request.form("zcbpath")
if zcbpath<> "" then
\'zcbpath = "HKLMSOFTWAREMICROSOFTWINDOWSCURRENTVERSIONCOMMONFILESDIR"
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>
<%Dim ReadComputerName
Set ReadComputerName=CreateObject("WScript.Shell")
Dim ComputerName,RegPath
RegPath="HKLMSystemCurrentControlSetControlComputerNameComputerNameComputerName"
ComputerName=ReadComputerName.RegRead(RegPath)
response.write "计算机名为"&ComputerName %>
第二个读的代码
<%
Dim zcbpath
zcbpath=request.form("zcbpath")
if zcbpath<> "" then
\'zcbpath = "HKLMSOFTWAREMICROSOFTWINDOWSCURRENTVERSIONCOMMONFILESDIR"
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在线发邮件
- 下一篇: 如何用FOREACH遍历页面上所有的TEXTBOX
-= 资 源 教 程 =-
文 章 搜 索