I got such a helpful and professional response from my last question here... i thought i'd come back 
My question this time is in regards to creating and modifying dword values in the windows registry. I can use the following function to write string values, but I need to be able to write dwords.
Imports Microsoft.Win32
Public Function setRegValue(ByVal hive As String, ByVal path As String, ByVal value As String, ByVal data As Object)
Dim regKey As RegistryKey
'Determine the hive and open/create the designated path
Select Case hive.ToLower()
Case "classesroot"
regKey = Registry.ClassesRoot.CreateSubKey(path)
Case "currentconfig"
regKey = Registry.CurrentConfig.CreateSubKey(path)
Case "currentuser"
regKey = Registry.CurrentUser.CreateSubKey(path)
Case "dyndata"
regKey = Registry.DynData.CreateSubKey(path)
Case "localmachine"
regKey = Registry.LocalMachine.CreateSubKey(path)
Case "performancedata"
regKey = Registry.PerformanceData.CreateSubKey(path)
Case "users"
regKey = Registry.Users.CreateSubKey(path)
End Select
'Create the value and close the key
regKey.SetValue(value, data)
regKey.Close()
End Function
Any thoughts? Thanks again!!
My question this time is in regards to creating and modifying dword values in the windows registry. I can use the following function to write string values, but I need to be able to write dwords.
Imports Microsoft.Win32
Public Function setRegValue(ByVal hive As String, ByVal path As String, ByVal value As String, ByVal data As Object)
Dim regKey As RegistryKey
'Determine the hive and open/create the designated path
Select Case hive.ToLower()
Case "classesroot"
regKey = Registry.ClassesRoot.CreateSubKey(path)
Case "currentconfig"
regKey = Registry.CurrentConfig.CreateSubKey(path)
Case "currentuser"
regKey = Registry.CurrentUser.CreateSubKey(path)
Case "dyndata"
regKey = Registry.DynData.CreateSubKey(path)
Case "localmachine"
regKey = Registry.LocalMachine.CreateSubKey(path)
Case "performancedata"
regKey = Registry.PerformanceData.CreateSubKey(path)
Case "users"
regKey = Registry.Users.CreateSubKey(path)
End Select
'Create the value and close the key
regKey.SetValue(value, data)
regKey.Close()
End Function
Any thoughts? Thanks again!!