Results 1 to 8 of 8
  1. #1
    hugio88's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    90
    Reputation
    10
    Thanks
    9
    My Mood
    Inspired

    Question i want to read a binary string from regedit loaded to a textbox in visualbasic, HELP?

    so when i press the button it loads up the data from the regedit..

    so i mean this:

    looks like this: 67f7633f565fc8d5d8067193dbc158c4.png
    Type of registry: (REG_BINARY) b4674e97172fcad7bcf2a1c32ff70dd3.png

    and i came up with this code: c68a03892213252c3be762e683fcb587.png

    but then i get an thisone into my textbox..
    thisone is the registry name, but i need the data of thisone..
    046f555c8ecaeb6b632dbc6350a9ce45.png

    sorry for all the pictures, i thought it would be some more clear for everbody

  2. #2
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108



  3. #3
    hugio88's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    90
    Reputation
    10
    Thanks
    9
    My Mood
    Inspired
    Quote Originally Posted by Blubb1337 View Post

    i dont get it/ i dont know how to fix it!

  4. #4
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    regedit is just a program to access the "Windows Registry" aka a big database of settings.

    vb.net has a class to access / modify the registry. You have to learn how to use the class .net gives you.

    Accessing the Registry with Visual Basic .NET
    Code:
    Imports Microsoft.Win32
    Dim regVersion As RegistryKey
    Dim keyValue As String
    keyValue = Software\\Microsoft\\TestApp\\1.0
    regVersion = Registry.CurrentUser.OpenSubKey(keyValue, False)
    Dim intVersion As Integer = 0
    If (Not regVersion Is Nothing) Then
        intVersion = regVersion.GetValue("Version", 0)
        regVersion.Close()
    End If
    But I'm not going to explain how to use the class.


    apparently
    Code:
            Dim has As String
            has = My.Computer.Registry.CurrentUser.GetValue("PATH", "thisone", Nothing)
            Textbox1.Text = ha
    apparently you're not passing in the correct arguments / the path doesn't exist. This new .net class for accessing the registry is pretty straight forward. Get a value, Set a value.

    Also, Getvalue() returns an Object, so setting ha = an object, is a little weird and a sign the code has a problem. It's calling .ToString() on the object automatically, but that may not be what you want/expect.




    The function has 3 overloads.

    (name As String)
    (name As String, defaultValue as Object)
    (name, defaultvalue, options As Microsoft.Win32.RegistryValueOptions)


    You are passing in 3 arguments (string, string, nothing). I think this is incorrect.

    If "name" is not found, "defaultValue" will be returned. Which I think is happening in your case? You're not telling the registry WHICH exact key/data pairs you want. You have to define "path" better / in a different way.

    You pass in a string: "thisone", where it expects an 'Object' -- red flag.
    -------
    they did it slightly differently (using more classes / objects), but the microsoft code uses

    Dim keyValue As String
    keyValue = Software\\Microsoft\\TestApp\\1.0

    software\microsoft\TestApp <-- is where in the registry database this data is located. Where is your "PATH" supposed to be pointing to?

    ---------- Post added at 08:02 AM ---------- Previous post was at 07:36 AM ----------

    edit: OP, use the [ img ] [ /img ] and [ code ] [ / code] tags plz : not fun having to open 4 tabs just to see what your code is etc.
    Last edited by abuckau907; 01-27-2013 at 07:04 AM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  5. #5
    hugio88's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    90
    Reputation
    10
    Thanks
    9
    My Mood
    Inspired
    Quote Originally Posted by abuckau907 View Post
    regedit is just a program to access the "Windows Registry" aka a big database of settings.

    vb.net has a class to access / modify the registry. You have to learn how to use the class .net gives you.

    Accessing the Registry with Visual Basic .NET
    Code:
    Imports Microsoft.Win32
    Dim regVersion As RegistryKey
    Dim keyValue As String
    keyValue = Software\\Microsoft\\TestApp\\1.0
    regVersion = Registry.CurrentUser.OpenSubKey(keyValue, False)
    Dim intVersion As Integer = 0
    If (Not regVersion Is Nothing) Then
        intVersion = regVersion.GetValue("Version", 0)
        regVersion.Close()
    End If
    But I'm not going to explain how to use the class.


    apparently
    Code:
            Dim has As String
            has = My.Computer.Registry.CurrentUser.GetValue("PATH", "thisone", Nothing)
            Textbox1.Text = ha
    apparently you're not passing in the correct arguments / the path doesn't exist. This new .net class for accessing the registry is pretty straight forward. Get a value, Set a value.

    Also, Getvalue() returns an Object, so setting ha = an object, is a little weird and a sign the code has a problem. It's calling .ToString() on the object automatically, but that may not be what you want/expect.




    The function has 3 overloads.

    (name As String)
    (name As String, defaultValue as Object)
    (name, defaultvalue, options As Microsoft.Win32.RegistryValueOptions)


    You are passing in 3 arguments (string, string, nothing). I think this is incorrect.

    If "name" is not found, "defaultValue" will be returned. Which I think is happening in your case? You're not telling the registry WHICH exact key/data pairs you want. You have to define "path" better / in a different way.

    You pass in a string: "thisone", where it expects an 'Object' -- red flag.
    -------
    they did it slightly differently (using more classes / objects), but the microsoft code uses

    Dim keyValue As String
    keyValue = Software\\Microsoft\\TestApp\\1.0

    software\microsoft\TestApp <-- is where in the registry database this data is located. Where is your "PATH" supposed to be pointing to?

    ---------- Post added at 08:02 AM ---------- Previous post was at 07:36 AM ----------

    edit: OP, use the [ img ] [ /img ] and [ code ] [ / code] tags plz : not fun having to open 4 tabs just to see what your code is etc.
    Really good presentatie thing! I can open the data from the regedit in ascii, but the problem is that the 'thisone' is in binary(hex) so when i run the code it doesnt work.. And in the pictures i removed the path because i cant show you that.., im sorry about the pictures!



    Im going to show you that tomorrow, im on my mobile now
    [IMG]https://i1263.photobucke*****m/albums/ii633/TallyBean18/GIF/tumblr_lvaz17lpzz1qhs8sxo1_500.gif[/IMG]

  6. #6
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    So you know the problem. It only doesn't work for binary strings? Well...figure out how to read binary strings Ask a specific question, not just "but i need the.." or I won't reply again.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  7. The Following User Says Thank You to abuckau907 For This Useful Post:

    hugio88 (01-28-2013)

  8. #7
    hugio88's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    90
    Reputation
    10
    Thanks
    9
    My Mood
    Inspired
    Quote Originally Posted by abuckau907 View Post
    So you know the problem. It only doesn't work for binary strings? Well...figure out how to read binary strings Ask a specific question, not just "but i need the.." or I won't reply again.
    then i will make a new post that is much clearer xd

    but thanks for your help anyway! because the responds on the coding forum takes a while =/

  9. #8
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    If you think that's best, sure.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

Similar Threads

  1. [Solved] VB Read String from memory
    By waffl95 in forum Call of Duty Modern Warfare 3 Coding, Programming & Source Code
    Replies: 3
    Last Post: 12-21-2012, 05:32 AM
  2. How to read a text file from a website
    By ppl2pass in forum Visual Basic Programming
    Replies: 3
    Last Post: 02-13-2010, 09:19 PM
  3. Guys READ this! Important Message from PixieCorp
    By Zoom in forum Visual Basic Programming
    Replies: 5
    Last Post: 11-24-2009, 02:24 PM
  4. hack/trainer wanted please read
    By KIOTDL in forum Hack Requests
    Replies: 1
    Last Post: 09-06-2007, 03:20 AM
  5. Regarding Test's Bypass. IF YOU WANT IT READ HERE
    By xxpagxx in forum WarRock - International Hacks
    Replies: 158
    Last Post: 07-10-2007, 04:56 PM