ASP能讀寫注冊(cè)表
發(fā)表時(shí)間:2024-06-10 來(lái)源:明輝站整理相關(guān)軟件相關(guān)文章人氣:
[摘要]一個(gè)例子: <%Dim ReadComputerName Set ReadComputerName=CreateObject("WScript.Shell") Dim ComputerName,RegPath RegPath="HKLM\System\Curre...
一個(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>