Forum posts for regedit.exe

Why does registryKey.GetValue still read the old value after I changed the rgistry with rege…

So I access the registry value with this code:

Dim dm2 As RegistryKey
Dim dm2Value As String = 0

dm2 = Registry.LocalMachine.OpenSubKey('SoftwareLibralexDM')
If dm2 IsNot Nothing Then
dm2Value = DirectCast(dm2.GetValue('DM2'), String)
End If


Originally I had '1' stored as the value under DM2, and it worked fine :) So then I closed the program and changed the value of DM2 to '2' with regedit.exe, but I kept getting '1' from dm2.getValue :( I thought maybe restarting would fix the problem, but then I still got a '1' from dm2.GetValue while regedit.exe told me I have a 2 stored there.

What am I doing wrong?

Envirnment Info:
Visual Studio 2010 on 64-bit Windows 7

View complete forum thread with replies

Other posts related to regedit.exe

See Related Forum Messages: Follow the Links Below to View Complete Thread

.abc branch in regedit.exe
How does regedit.exe create empty binary values
Why I can't see 'wow6432node' when using process.start(“regedit.exe”)?
OpenSubKey() returns null for a registry key that I can see in regedit.exe
How to detect Java is installed via REGEDIT.exe from a batch file?
How can I run the regedit.exe from a Perl script on Windows 2008 Server?
Why does registryKey.GetValue still read the old value after I changed the rgistry with rege…

What is the carbon footprint of your coffee?

Is it low? Is it high? Can this things really kill the planet Earth? Maybe the answer will surprise you. Maybe not.