Hi guys. New to this forum, but been in the VB world since the late 90's.
Reading from the registry is simple enough, but this is the first time I've tried to read a REG_Binary value... (99% of you just cringed and left, I'm sure)
Below is the code I'm using. From what I understand, REG_Binary values are byte strings. What I'm using doesnt seem to work:
The above code returns nothing, literally. If I feed it into a msgbox, it doesnt even pop up a msgbox...
Questions you may have:
Obviously, I'm trying to decode my windows product key. I'm working on an application like magicjellybean, which returns product keys found on your system.
Yes, the key exists, this is the value it holds:
Any/all help appreciated!
Reading from the registry is simple enough, but this is the first time I've tried to read a REG_Binary value... (99% of you just cringed and left, I'm sure)
Below is the code I'm using. From what I understand, REG_Binary values are byte strings. What I'm using doesnt seem to work:
VB.NET:
Dim KeyBytes() As Byte = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "DigitalProductID", Nothing)
Dim KeyValue As String = System.Text.Encoding.UTF8.GetString(KeyBytes)
TextBox1.Text = TextBox1.Text & KeyValue
The above code returns nothing, literally. If I feed it into a msgbox, it doesnt even pop up a msgbox...
Questions you may have:
Obviously, I'm trying to decode my windows product key. I'm working on an application like magicjellybean, which returns product keys found on your system.
Yes, the key exists, this is the value it holds:
VB.NET:
I can copy but not paste it! This is truly an evasive one
Any/all help appreciated!