[Help]Registry DWORD?

Posts 1–2 of 2 · Page 1 of 1
[Help]Registry DWORD?
Hey it's me again x]
I'm just wondering how will i create a DWORD in the registry?
Iv had a look at NextGen1 TuT and Blubb1337 TuT, but that only allows me to create a SubKey
Instead on rKey.createSubKey I want to create a DWORD

Code:
Imports Microsoft.Win32

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim rKey As RegistryKey
        rKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList", True)
        rKey.CreateSubKey(TextBox1.Text)
        rKey.Close()
        Label3.Text = ("Account Hidden")
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim rKey As RegistryKey
        rKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList", True)
        rKey.DeleteSubKey(TextBox1.Text)
        rKey.Close()
        Label3.Text = ("Account Shown")
    End Sub
End Class


Can anyone help me?
Cheers Jàzzà (:
I'm on mobile, so the code is like truncated after 3 characters... But if you use the Microsoft.Win32.Registry class, any numerical value (int, long, Int64...) will be converted to a DWORD type when you use RegistryKey::SetValue, and it will attempt to convert the registry value to your target type, whatever it may be when you call GetValue(). This is automatically wrapped. If it can't (eg, trying to load a MULTI_SZ as an int will give you an exception.
Posts 1–2 of 2 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us