penggilas2 Posted January 7, 2010 Posted January 7, 2010 How to Create Binary Registry in this Imangemy 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 00Thank`S For this Forum..
James Posted January 7, 2010 Posted January 7, 2010 What about using the Hex() function? RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics", "MenuFont", "REG_BINARY", Hex("VALUE")) Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
KaFu Posted January 7, 2010 Posted January 7, 2010 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 OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
penggilas2 Posted January 7, 2010 Author Posted January 7, 2010 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..
meier3283 Posted February 4, 2010 Posted February 4, 2010 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,41And 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,41I 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 thanks all, - David
KaFu Posted February 4, 2010 Posted February 4, 2010 Try this: RegWrite("HKLM\SOFTWARE\McAfee\DesktopProtection","LicenseInformation","REG_BINARY", 0x42b4c472aebb3ee42033abb3a3bb3ee42033abb3a3bbffa9bd3582422e97500242155ca241) OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
ProgAndy Posted February 4, 2010 Posted February 4, 2010 You should use real binary data $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
meier3283 Posted February 4, 2010 Posted February 4, 2010 You should use real binary data $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,
meier3283 Posted February 4, 2010 Posted February 4, 2010 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now