Jump to content

Edit binary registry value


Go to solution Solved by lolipop,

Recommended Posts

  • Solution

You can use RegRead, BinaryMid and RegWrite to do what you want. Read more of their usage in the help file.

For _BinaryReplace, you can get the UDF from >here

Example

#include <Binary.au3>

;Read the registry
$vRegistry = RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections", "DefaultConnectionSettings")

;Extract a number of bytes from the binary
$Temp1 = BinaryMid($vRegistry , 8, 1)

;Replace the Binary
$Temp2 = _BinaryReplace($vRegistry, $Temp1, "0x09", 1)

;Write registry
RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\", "DefaultConnectionSettings", REG_BINARY", $Temp2)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...