VB5 and Windows 9x registry - TechRepublic
General discussion
August 3, 2001 at 04:49 AM
tech010

VB5 and Windows 9x registry

by tech010 . Updated 24 years, 10 months ago

Please help. I developed a small program that manipulates the registry in a GUI this way our Admins don’t have to weed through the registry manually, anyway. I have it working totally fin in Windows 2000, but it will not read or write to the Windows9x registry. Here’s an example of the code:

I have a module with,
Public Function ReadKey(Value As String) As String

Dim b As Object
On Error Resume Next
Set b = CreateObject(“wscript.shell”)
r = b.RegRead(Value)
ReadKey = r
End Function

Then in the actual program to see the registered owner I would put:
Private Sub Command5_Click()
MsgBox “Registered owner of this system is: ” & ReadKey(“HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Registeredowner”)
End Sub

What is wrong with my code?

This discussion is locked

All Comments