RegRead Function:

The RegRead function reads Keys and Values contained in the Windows Registry. The required argument regpath is the path to a Key or Value. If the key or value cannot be found or displayed for any reason, RegRead returns Null. If regpath ends with a \ character it returns the Key instead of the value.

Syntax:
string = RegRead(regpath)
Example Usage:
<%
 ' find the most current version of the ADODB.Connection
 ' and grab it's class ID using the RegRead function.

dim a

 ' name of the most current adodb.connection object

a = RegRead("HKCR\ADODB.Connection\CurVer\")

 ' read the ClsID of the current adodb.connection object
 ' and write it to the browser.
 ' (clsID can be used in the metadata tag to grab all 
 '  the ado constants without explicitly declaring them)

response.write RegRead("HKCR\" & a & "\ClsID\") & "<BR>"


 ' check for the existence of the Excel.Application 
 ' object (Indicates Microsoft Excel has been 
 ' successfully installed on the server)

a = RegRead("HKCR\Excel.Application\")

If isNull(a) Then
	 ' an error has occurred while trying to get the entry.
	Response.Write "Excel.Application object not found on this server!"
Else
	 ' check the version
	 ' "Excel.Application.9" indicates MS Excel 2000

	Response.Write RegRead("HKCR\Excel.Application\CurVer\")

	 ' if a value is sent to the browser ("Excel.Application.version"), 
	 ' you can use the Excel object in your ASP pages to create 
	 ' and read spreadsheets!

End If
%>
ASP Source Code:
<%
Private Function RegRead(byVal regpath)
	Dim objShl
	Set objShl = CreateObject("wscript.shell")
	On Error Resume Next
	RegRead = objShl.RegRead( regpath )
	If Err Then
		Err.Clear
		RegRead = Null
	End If
	On Error GoTo 0
	Set objShl = Nothing
End Function
%>