program create registry key

cdoverlaw

Well-known member
Joined
Oct 11, 2003
Messages
146
i want a program to create the registry key

local machine/software/revoshift/webhost toolbox/
to have a string called
"valid"
and that value is equal to
"true"

Jonathan
 
Code:
Sub SetKey()
        Dim rk As Microsoft.Win32.RegistryKey

        rk = Microsoft.Win32.Registry.LocalMachine.CreateSubKey("software\revoshift\webhost toolbox\")



        If Not rk Is Nothing Then

            If rk.SetValue("valid") = "true" Then

                MessageBox.Show("Yippe")

            End If

        End If
    End Sub

This is wot i got, its got error

C:\Documents and Settings\Administrator.DEFAULT\My Documents\Visual Studio Projects\WindowsApplication2\Form1.vb(138): Argument not specified for parameter value of Public Sub SetValue(name As String, value As Object).
 
i thought maybe that i was wrong with above post code so i tried this

Code:
Sub SetKey()
        Dim rk As Microsoft.Win32.RegistryKey

        rk = Microsoft.Win32.Registry.LocalMachine.CreateSubKey("software\revoshift\webhost toolbox\")

        rk.SetValue("Valid") = "True"

    End Sub

but same error
 
Back
Top