Results 1 to 12 of 12
  1. #1
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed

    [Reference] RegEdit

    Hej has been asking me a series of questions regarding Dwords and related, Instead of just sending over the code (which was my initial intention)I have decided to create a "Article" / "Tut" as this can be usueful to developers for 100's of reasons.

    Registry Keys Article/Tutorial





    As always, Follow this article, read along, and open VB and start a new project and follow along.

    Developers (Windows Developers) have been using the registry as a place to store application settings, and in some cases can be used to change settings of other applications, so the question becomes, how can we harnest this feature in VB.net

    Definitions paraphrased by me (Original Source Wiki)

    SubTree

    • HKEY_CURRENT_USER
      Configuration Settings of the user who logged on. (Currently)
    • HKEY_USERS
      Contains all user profiles Settings.
    • HKEY_LOCAL_MACHINE
      Contains Settings and configuration Information particular to the computer.
    • HKEY_CLASSES_ROOT
      Contains data that associates extensions wiith the program, and configuration data for COM objects.
    • HKEY_CURRENT_CONFIG
      Contains information about hardware used on system startup.



    Subkeys and Values.

    Paraphrased by me (original source WIKI)

    • REG_SZ
      A fixed-length text string.
    • REG_EXPAND_SZ
      A variable-length text string.
    • REG_DWORD
      A number that is 4 bytes (32 bits) long. (Data)
    • REG_MULTI_SZ
      Multiple text strings formatted as an array of null strings


    Microsoft.Win32 Namespace

    • ClassesRoot
      Read base key HKEY_CLASSES_ROOT.
    • CurrentConfig
      Reads base key HKEY_CURRENT_CONFIG.
    • CurrentUser
      Reads base key HKEY_CURRENT_USER
    • LocalMachine
      Reads base key HKEY_LOCAL_MACHINE.
    • Users
      Reads base key HKEY_USERS.
    • Name
      Retrieves the name of key.
    • SubKeyCount
      Retrieves the count of subkeys.
    • ValueCount
      Retrieves the count of values.
    • Close
      Closes the key.
    • CreateSubKey
      Creates a subkey or opens one.
    • DeleteSubKey
      Deletes a subkey.
    • DeleteSubKeyTree
      Deletes a subkey and any child subkeys.
    • DeleteValue
      Deletes the specified value from this key.
    • GetSubKeyNames
      Retrieves an array of strings from all subkey names.
    • GetValue
      Retrieves the specified value.
    • GetValueNames
      Retrieves an array of strings from all names associated with the specified Key
    • OpenSubKey
      Retrieves a specified subkey (with write access)
    • SetValue
      Sets the specified value.


    __________________________________________________ _______________


    Example 1 (Create Subkey)

    Code:
    Dim rKey As RegistryKey
    rKey = Registry.LocalMachine.OpenSubKey("SOFTWARE", True)
    rKey.CreateSubKey("mpgh sample app")
    rKey.Close()
    What did this do?

    This code created a subkey under HKLM\Software called "mpgh sample app".

    Example 2 (Reading and Writing a Subkey)

    Code:
    Dim rKey As RegistryKey
    Dim nr As Decimal
    rKey = Registry.LocalMachine.OpenSubKey("Software\mpgh sample app", True)
    rKey.SetValue("Application", "mpgh sample app")
    nr = rKey.GetValue("Version", 0.0)
    If nr <  1.2 Then
    rKey.SetValue("Version", 1.3)
    End If
    rKey.Close()
    and Finally the easiest of them all , Deleting a key

    Code:
    Dim rKey As RegistryKey
    rKey = Registry.LocalMachine.OpenSubKey("Software", True)
    rKey.DeleteSubKey("mpgh sample app", True)
    rKey.Close()
    In this example, The create "mpgh sample app" key is deleted

    Hope this helps everyone who may need it, have fun and enjoy
    Last edited by NextGen1; 01-29-2010 at 08:50 AM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  2. The Following 3 Users Say Thank You to NextGen1 For This Useful Post:

    Blubb1337 (01-29-2010),nathanael890 (05-22-2010),Zoom (01-29-2010)

  3. #2
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    Very Nice TUT, could come in handy

  4. #3
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    0.0 good tut, but needs more explaining in the code.


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  5. #4
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    I like to use RegEdit to edit window's open-able files to no .exe's so that you can't run any programs.

    DON'T TRY THAT ON YOUR COMPUTER... ITS FOR EDUCATIONAL PURPOSES ONLY.

  6. #5
    treeham's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    heh. Turn around.
    Posts
    200
    Reputation
    10
    Thanks
    41
    My Mood
    Cynical
    Quote Originally Posted by lolland View Post
    I like to use RegEdit to edit window's open-able files to no .exe's so that you can't run any programs.

    DON'T TRY THAT ON YOUR COMPUTER... ITS FOR EDUCATIONAL PURPOSES ONLY.
    lol lolland...

    And could you access other registry entries, like to say... Change the password expiration date so people have to change their password everyday XD
    In Choob Language:
    also for all your info.. i didnt copy and paste shit.. coz i dont think anyone has realeased any source code for the New update of CA.. so sdfu..
    In English:
    I didn't copy and paste because no one has released what I need copy and paste
    Oh Choobs...

  7. #6
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,971
    My Mood
    Happy
    Thats what I'm talking about! Thank you! Many ++++++++++++++++++++++++++++++++++++++++++++++++++ ++++
    -Rest in peace leechers-

    Your PM box is 100% full.

  8. #7
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Quote Originally Posted by treeham View Post
    lol lolland...

    And could you access other registry entries, like to say... Change the password expiration date so people have to change their password everyday XD
    Yeah it can be done.

    One thing I also did to a computer is disabled the keyboard and mouse, all USB ports, and the CD drive.

    It was awesome, but the tech guys at my school got really pissed off and I got suspended.

  9. #8
    XGelite's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Enter text here
    Posts
    1,344
    Reputation
    12
    Thanks
    276
    Quote Originally Posted by hejsan1 View Post
    Thats what I'm talking about! Thank you! Many ++++++++++++++++++++++++++++++++++++++++++++++++++ ++++
    you do know you could have just googled this right. When i was wondering how to do this a while back... i found it in 1 search

  10. #9
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    @Everything, There is a lot you can do with this, however , certain modifications will not work without power user or admin rights, so A Gpedit Hack maybe another tutorial


     


     


     



    The Most complete application MPGH will ever offer - 68%




  11. #10
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,971
    My Mood
    Happy
    Quote Originally Posted by XGelite View Post
    you do know you could have just googled this right. When i was wondering how to do this a while back... i found it in 1 search
    Lol i always google before i ask nextgen but it's like he´s much better finding stuff
    -Rest in peace leechers-

    Your PM box is 100% full.

  12. #11
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Quote Originally Posted by hejsan1 View Post
    Lol i always google before i ask nextgen but it's like he´s much better finding stuff
    I always use Wiki for definitions and use knowledge and experience for code, in some occastions (even the best coder)fails at figuring something out, in which case, ......GOOGLE (or call my friend Chris, Who knows twice as much as me)
    Last edited by NextGen1; 01-29-2010 at 09:07 AM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  13. #12
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,971
    My Mood
    Happy
    Quote Originally Posted by NextGen1 View Post
    I always use Wiki for definitions and use knowledge and experience for code, in some occastions (even the best coder)fails at figuring something out, in which case, ......GOOGLE (or call my friend Chris, Who knows twice as much as me)
    Let him join mpgh, lol :P

    But thanks any way, it works fine
    -Rest in peace leechers-

    Your PM box is 100% full.

Similar Threads

  1. [Hack D/C Fix] Exit when going into a game? / reference memory fix
    By shnarg in forum Combat Arms Hacks & Cheats
    Replies: 4
    Last Post: 08-09-2009, 12:52 AM
  2. Referal Action?
    By misterchill in forum Suggestions, Requests & General Help
    Replies: 4
    Last Post: 06-29-2009, 07:33 AM
  3. Minimal Reference
    By kirapwns in forum Art & Graphic Design
    Replies: 101
    Last Post: 06-21-2009, 06:16 PM
  4. For future reference
    By Iwin in forum Art & Graphic Design
    Replies: 3
    Last Post: 10-13-2008, 12:58 PM
  5. Help Me By Referring Me! Please!
    By shame.. in forum General Hacking
    Replies: 0
    Last Post: 08-20-2008, 01:17 PM