ASP能读写注册表

发布时间:2007年03月22日      浏览次数:888 次
一个例子:
<%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="2.asp" method=post>
注册表键值<input type=text name=zcbpath id=zcbpath>
<input type=submit>
</form>
免责声明:本站相关技术文章信息部分来自网络,目的主要是传播更多信息,如果您认为本站的某些信息侵犯了您的版权,请与我们联系,我们会即时妥善的处理,谢谢合作!