yo_bee
asked on
How to read registry String Names under a Subkey
I am writing a very basic VB form that populates a combobox with all active computers in our Domain. Once The Computer is selected I want to purge a String from a subkey
I was able to get the string value of a certian StringName using the "GETSTRINGVALUE".
The ultimate goal it to list all the String Names under the key.
I was able to get the string value of a certian StringName using the "GETSTRINGVALUE".
The ultimate goal it to list all the String Names under the key.
Private Sub reg_read()
Dim oConn As ConnectionOptions = New ConnectionOptions()
Dim scope = New ManagementScope("\\" & ComboBox1.Text & "\root\default")
Dim registry As ManagementClass = New ManagementClass(scope, New ManagementPath("StdRegProv"), Nothing)
Dim inParams As ManagementBaseObject = registry.GetMethodParameters("EnumValues")
inParams("hDefKey") = 2147483650
inParams("sSubKeyName") = "SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\"
Dim outParams As ManagementBaseObject = registry.InvokeMethod("EnumValues", inParams, Nothing)
ListBox1.Items.Add(outParams("sValueName"))
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You example is VB6, he need VB.NET
ASKER
Sorry for the delay, but things have been taking priority on this project.
I will give all suggestions a try when I get back from the Holiday vactions.
Someone is worthy of the 500 points.
I will give all suggestions a try when I get back from the Holiday vactions.
Someone is worthy of the 500 points.
You need a form, a comboBox (combo1), a textBox (Text1), 2 listBox (list1, list2) and a commandButton (cmd1)
and paste the next code snippet...
Open in new window