how can I edit the windows registry using vb.net

Recommended Answers

All 7 Replies

why would you want to? I never really thought you could. Or would want to. When you could do it your self bu selecting Run in the start menu, and typing regedit.exe, or what ever yours is depending on your OS. Also dont edit reg. Unless you are completely sure of what your doing. We jsut had a case here ont he board were an adult lost his mouse, keyboard, dh, and floppy drive on such a simple but hard to fix mistake. (=, good luck bro!.

I have found the way ... and I'll show you the software for registry editing I am making .. hehe

If you need a beta tester. Im up for it.

Put it in a zip, and ill test it on a seperate PC.

thanks Sphyenx ... I'll see if I dont have a testing pc.

I know this is an old topic, but in case someone else googles it...

For doing a simple key edit in a .net program, you can simply use a variable of the following code:

Dim WSH
        'Changes <key> to <New Value>
        WSH = CreateObject("WScript.Shell")
        WSH.RegWrite("<key>", "<New Value>")

read registry value code in here

Dim readValue As String
readValue = My.Computer.Registry.GetValue _
("HKEY_CURRENT_USER\TestKey", "TestValue", Nothing)
Messabebox.shwo("The value is " & readValue)
Niki Skay

read registry values


Dim readValue As String
readValue = My.Computer.Registry.GetValue _
("HKEY_CURRENT_USER\TestKey", "TestValue", Nothing)
MsgBox("The value is " & readValue)

change registry values

Dim autoshell = My.Computer.Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows NT\CurrentVersion\Winlogon", True)
'' Set the value to 0
autoshell.SetValue("autorestartshell", 0)
autoshell.Close()


some time registry programs make virus ex. changing explorer.exe path

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.