Jump to content

How to Create REG_BINARY


Recommended Posts

How to Create Binary Registry in this Imange

Posted Image

my script :

RegWrite ("HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics","MenuFont","REG_BINARY","ôÿÿÿ........S.e.g.o.e. .U.I.....")

when run script dot (...) in my script in registy binary is 2E not 00

Thank`S For this Forum.. ;)

Link to comment
Share on other sites

Try something more like this:

RegWrite ("HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics","MenuFont","REG_BINARY",0xF4FFFFFF000000000000000000000000) ; only part of the binary code, fill the rest yourself
Link to comment
Share on other sites

  • 4 weeks later...

Can I add on a quick question related to this situation?

I've tried exporting a binary registry key

"LicenseInformation"=hex:42,b4,c4,72,ae,bb,3e,e4,20,33,ab,b3,a3,bb,3e,e4,20,33,\

ab,b3,a3,bb,ff,a9,bd,35,82,42,2e,97,50,02,42,15,5c,a2,41

And then try to do a RegWrite on the same data:

RegWrite("HKLM\SOFTWARE\McAfee\DesktopProtection","LicenseInformation","REG_BINARY", "42,b4,c4,72,ae,bb,3e,e4,20,33,ab,b3,a3,bb,3e,e4,20,33,ab,b3,a3,bb,ff,a9,bd,35,82,42,2e,97,50,02,42,15,5c,a2,41")

Once imported via my au script, the registry data is not the same as I exported:

"LicenseInformation"=hex:30,30,30,30,30,30,32,41

I know I'm bumping up against a conversion problem, either with regedit, or AU, but despite having tried the data several ways (removing commas, etc), i can't get it to work.

any ideas are very much appreciated, as I have a project I have to get out the door today, and this is hanging me up :D

thanks all,

- David

Link to comment
Share on other sites

Link to comment
Share on other sites

You should use real binary data :D

$binary = Binary("0x42b4c472aebb3ee42033abb3a3bb3ee42033abb3a3bbffa9bd3582422e97500242155ca241")
RegWrite("HKLM\SOFTWARE\McAfee\DesktopProtection","LicenseInformation","REG_BINARY", $binary)

; one line: 
RegWrite("HKLM\SOFTWARE\McAfee\DesktopProtection","LicenseInformation","REG_BINARY", Binary("0x42b4c472aebb3ee42033abb3a3bb3ee42033abb3a3bbffa9bd3582422e97500242155ca241"))

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

You should use real binary data :D

$binary = Binary("0x42b4c472aebb3ee42033abb3a3bb3ee42033abb3a3bbffa9bd3582422e97500242155ca241")
RegWrite("HKLM\SOFTWARE\McAfee\DesktopProtection","LicenseInformation","REG_BINARY", $binary)

; one line: 
RegWrite("HKLM\SOFTWARE\McAfee\DesktopProtection","LicenseInformation","REG_BINARY", Binary("0x42b4c472aebb3ee42033abb3a3bb3ee42033abb3a3bbffa9bd3582422e97500242155ca241"))

right, because when you export from regedit, it converts to hex, yes? I guess that's where I'm stuck, I haven't found a way to get the data from hex to binary. but also, I've read that Autoit does some if this type of conversion automatically... so do I even need to convert first?

Trying those examples now...

thanks guys,

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...