Click to See Complete Forum and Search --> : reading registry key values in VBScript
nbaker
Jan 9th, 2001, 03:14 PM
Can someone please help me? I am trying to read the registry on Windows NT Server 4.0 using VBScript. I would rather not have to use API calls unless it is absolutely necessary. I am trying to get the machines 'computer name' under the identification tab of the Network Neighborhood Properties. I have it located in the registry, but it seems that my scripts do not work properly. Please help...
nbaker@pharmalinkfhi.com
thanks
Clunietp
Jan 9th, 2001, 11:46 PM
You can't directly read from the registry thru VBScript/ASP, you'll need a component to do that for you
fortunately, you can use the Scripting Object Model to do this for you, and I have whipped up some ASP code to show you how
<%@Language=VBScript EnableSessionState=False%>
<% option explicit %>
<html>
<body>
<%
Dim objNetwork
Set objNetwork = Server.CreateObject("WScript.Network")
Response.Write "Computer Name: " & objNetwork.ComputerName
Set objNetwork = Nothing
%>
</body>
</html>
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.