Sign in to follow this  
Followers 0
penggilas2

How to Create REG_BINARY

9 posts in this topic

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

Share this post


Link to post
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

Share this post


Link to post
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

Thank`s KaFu it`s work.. ;)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Try this:

RegWrite("HKLM\SOFTWARE\McAfee\DesktopProtection","LicenseInformation","REG_BINARY", 0x42b4c472aebb3ee42033abb3a3bb3ee42033abb3a3bbffa9bd3582422e97500242155ca241)

Share this post


Link to post
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

Share this post


Link to post
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,

Share this post


Link to post
Share on other sites

I tried the example from ProgAndy first, and it's working great. So thanks to the both of you for taking the time to help out.

Share this post


Link to post
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
Sign in to follow this  
Followers 0