關(guān)于ASP讀寫(xiě)注冊(cè)表的實(shí)例分享
下面提供的是關(guān)于ASP讀寫(xiě)注冊(cè)表的實(shí)例,希望對(duì)初學(xué)ASP的朋友們有所幫助。
一個(gè)例子:
<%Dim ReadComputerName
Set ReadComputerName=CreateObject("WScript.Shell")
Dim ComputerName,RegPath
RegPath="HKLM\System\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName"
ComputerName=ReadComputerName.RegRead(RegPath)
response.write "計(jì)算機(jī)名為"&ComputerName %>
第二個(gè)讀的代碼
<%
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>
注冊(cè)表鍵值<input type=text name=zcbpath id=zcbpath>
<input type=submit>
</form>