The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!
Public Sub Main
Dim regData As Byte() = {&HF0, &HFF, &H20, &H00}
Dim regTopKey As String = "HKEY_LOCAL_MACHINE"
Dim regPath As String = "\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp"
' My.Computer.Registry.SetValue(regTopKey & regPath, "BinData", PortNumber, RegistryValueKind.Binary)
End Sub
Regards
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
From novice to tech pro — start learning today.
Are you adding or modifying existing keys?
http://msdn.microsoft.com/en-us/library/aa289494(v=vs.71).aspx#vbtchaccessingregistrywithvisualbasicnetanchor5
The link includes an example with tests to determine whether you are adding a new pair, or modifying an existing one.
Always test as well as backup/record what was there before you make changes.