Here's some code to find the registered owner, registered organisation, product id, and product name of your PC's installation of Windows! This works on both 95/98 and NT/2000, by looking in the CurrentVersion section of HKEY_LOCAL_MACHINE\Software\Microsoft\Windows. You can get lots of information from there, and in this case, it looks at "RegisteredOwner", "RegisteredOrganization", "ProductName" and "ProductId", but you could use the code to look up any other value too.
Private Declare Function RegQueryValueExStr Lib "advapi32" Alias "RegQueryValueExA" _
(ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, _
ByRef lpType As Long, ByVal szData As String, ByRef lpcbData As Long) As Long
Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" _
(ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, _
ByVal samDesired As Long, phkResult As Long) As Long
Private Declare Function RegQueryValueExLong Lib "advapi32" Alias "RegQueryValueExA" _
(ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, _
ByRef lpType As Long, szData As Long, ByRef lpcbData As Long) As Long
Private Const ERROR_MORE_DATA = 234
Private Const HKEY_CLASSES_ROOT = &H80000000
Private Const HKEY_CURRENT_USER = &H80000001
Private Const HKEY_LOCAL_MACHINE = &H80000002
Private Const HKEY_USERS = &H80000003
Private Const KEY_QUERY_VALUE = &H1
Private Sub Form_Load()
Dim sKey As String
sKey = "Software\Microsoft\Windows\CurrentVersion"
If GetStringValue("Software\Microsoft\Windows\CurrentVersion", "SystemRoot"

= "" Then
sKey = "Software\Microsoft\Windows NT\CurrentVersion"
End If
txtRegOwner = GetStringValue(sKey, "RegisteredOwner"

txtRegOrg = GetStringValue(sKey, "RegisteredOrganization"

txtProductName = GetStringValue(sKey, "ProductName"

txtProductID = GetStringValue(sKey, "ProductId"

End Sub
Private Function GetStringValue(sSectionKey As String, sValueKey As String) As String
Dim hKey As Long
Dim lResult As Long
Dim ordType As Long
Dim cData As Long
Dim sData As String
Dim e As Long
lResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, sSectionKey, 0, KEY_QUERY_VALUE, hKey)
lResult = RegQueryValueExLong(hKey, sValueKey, 0&, ordType, 0&, cData)
If lResult And lResult <> ERROR_MORE_DATA Then
DoEvents
Exit Function
End If
If ordType = 1 Then 'REG_SZ
sData = String$(cData - 1, 0)
lResult = RegQueryValueExStr(hKey, sValueKey, 0&, _
ordType, sData, cData)
GetStringValue = sData
Else
'MsgBox "Invalid String Value"
End If
End Function