Results 1 to 11 of 11

Thread: Writing to Registry

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Writing to Registry

    OK, A friend of mine needs help writing to registry... this is what he wants to write:


    [HKEY_LOCAL_MACHINE\SOFTWARE\abc\xyz]

    "bindform"="\"BICNDISSys\" yes no container"
    "class"=hex(7):42,49,43,4e,44,49,53,44,72,69,76,65,72,20,62,61,73,69,63,00,00
    "bindable"=hex(7):42,49,43,4e,44,49,53,44,72,69,76,65,72,20,42,49,43,4e,44,49,\
    53,41,64,61,70,74,65,72,20,6e,6f,6e,20,65,78,63,6c,75,73,69,76,65,20,31,30,\
    30,00,00

    "DevConf"=hex:84,00,00,00,84,00,00,00,84,00,00,00,04,00,00,00,6c,00,00,00,18,\
    00,00,00,6c,00,00,00,03,00,01,00,08,00,08,00,60,00,00,00,01,00,00,00,1c,00,\
    00,00,80,25,00,00,15,20,00,00,00,00,0a,00,0a,00,08,00,00,11,13,00,00,00,00,\
    00,06,00,00,00,30,00,00,00,30,00,00,00,30,00,00,00,30,00,00,00,00,00,00,00,\
    00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,10,01,00,00,00,\
    00,00,00,00,00,00,00,00,00,00,00
    I can't make heads or tails of this, but I do know he wanted to write it as binary with the zero values

    I need code for this. Any kind soul willing to help me out? There's a pretzel (salted) to be won here.

    Ta!

  2. #2

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    It's not as scary as it looks.

  3. #3

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Everyone hates me

  4. #4
    Fanatic Member skald2k's Avatar
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    535
    Yes everyone hates u.

    First step I assume is to convert Hex into Binary.
    - If at first you dont succeed, then give up, cause you will never will!

  5. #5
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    What he gave you is a REG file. name it with a reg extension and double click viola`!
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  6. #6
    Fanatic Member skald2k's Avatar
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    535

    How did u know uit was a REG file?

    ?
    - If at first you dont succeed, then give up, cause you will never will!

  7. #7
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    I work with the registry alot. Undoubtedly, some people may have noticed that I know alot of registry related answers
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  8. #8

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Hey Lord rat, I've noticed you have a lot of registry related answers.

    Can this be done through code? No, not even a shellexecute, but through coding?

  9. #9
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    Well, yeah.

    Basically, here is the format of what you posted:

    [HKEY_LOCAL_MACHINE\SOFTWARE\abc\xyz]

    This is the key. If it starts with a minus, it indicates you are deleting the key


    "bindform"="\"BICNDISSys\" yes no container"

    This assigns "BICNDISSys" yes no container to the value bindform. The backslashes mean that the quotes are part of the string and not intended to stop the quoted string.

    "class"=hex(7):42,49,43,4e,44,49,53,44,72,69,76,65,72,20,62,61,73,69,63,00,00

    This will assign the hex values seen to the value "class". Each number has no meaning to the last. Think of it as an array.

    "bindable"=hex(7):42,49,43,4e,44,49,53,44,72,69,76,65,72,20,42,49,43,4e,44,49,\
    53,41,64,61,70,74,65,72,20,6e,6f,6e,20,65,78,63,6c,75,73,69,76,65,20,31,30,\
    30,00,00

    "DevConf"=hex:84,00,00,00,84,00,00,00,84,00,00,00,04,00,00,00,6c,00,00,00,18,\
    00,00,00,6c,00,00,00,03,00,01,00,08,00,08,00,60,00,00,00,01,00,00,00,1c,00,\
    00,00,80,25,00,00,15,20,00,00,00,00,0a,00,0a,00,08,00,00,11,13,00,00,00,00,\
    00,06,00,00,00,30,00,00,00,30,00,00,00,30,00,00,00,30,00,00,00,00,00,00,00,\
    00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,10,01,00,00,00,\
    00,00,00,00,00,00,00,00,00,00,00

    Same as above

    When you save the hex values, you will have to use some function that is capable of entering hex values in to the registry. The SaveSetting and my Module both are not capable of this.
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  10. #10

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    So I'll have to (as skald said) convert all that to binary first...? and after that will I be able to do it ?

  11. #11
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    I honestly don't think so. If you open your registry and look at the following, you will see what I mean about hex:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer

    Look at ShellState
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width