<%
function readcomputername1()
Dim ReadComputerName
Set ReadComputerName=CreateObject("WScript.Shell") 'WScript.
Dim ComputerName,RegPath
RegPath="HKLM\System\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName"
ComputerName=ReadComputerName.RegRead(RegPath)
response.write "计算机的名称为:"+computername
'MsgBox("计算机名为"&ComputerName)
end function
%>
<h3>ASP读取注册表实例</h3>
<hr>
<%
call readcomputername1()
%>
<br>