Jump to content

How to add REG_BINARY value by using RegWrite


DORA
 Share

Recommended Posts

hi

sorry for my broken English :(

i am trying to add a REG_BINARY value but i could not do it right :D

i searched for it but i could not find anything to help me ...

this is the .reg file

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla Firefox\dim]
"kir"=hex:4b,4c,73,77,00,00,4b,4c,73,77,04,00,00,00,73,77,ef,6a,cc,0e,67,83,b3,\
  43,d9,21,f6,8f,dc,4e,04,a5,56,1e,7d,de,86,d4,43,4a,21,35,90,9a,b7,ac,ef,6a,\
  21,64,a9,89,79,69,6b,99,35,4d,8a,1e,4e,10,25,01,1b,fa,7a,9c,27,b7,67,ac,b0,\
  85,d4,d7,d4,83,07,c5,ef,9e,81,6b,85,f5,59,3a,ac,6b,85,c0,6a,e1,de,fe,9d,86,\
  8b,38,72,32,24,0f,f6,52,3f,bc,7b,2b,79,c0,e7,b3,a7,c5,8a,10,89,5c,59,b7,bd,\
  2c,e3,71,aa,7f,19,db,e0,9f,24,8a,4e,5b,5c,62,d2,f2,20,0f,74,70,b9,e5,25,2d,\
  ed,ce,ea,cb,62,9a,e4,d4,fb,75,80,c5,3c,76,5c,da,57,6d,a7,7b,a3,d2,29,d5,64,\
  85,15,84,be,5f,3a,1a,ad,cd,8e,6c,2d,b5,f6,5a,8a,a8,bb,d1,fb,ac,58,8e,28,9e,\
  dd,39,73,6a,97,aa,63,fd,a6,19,79,c3,92,54,e4,49,5a,eb,70,ae,aa,c5,8f,04,08,\
  bf,ac,b5,10,11,db,d0,91,30,af,57,f9,47,f6,6b,01,ae,af,5a,7d,2f,00,22,a0,20,\
  ef,e0,43,e5,d5,bc,1f,d9,ca,79,dc,06,9a,eb,a7,59,58,00,00,be,fe,35,e6,61,a9,\
  b1,80,28,79,a3,fb,48,bd,26,3d,39,10,ae,9b,f6,22,31,fe,d8,59,46,d9,07,8d,74,\
  17,d5,ab,6f,0f,49,b1,c0,14,11,49,82,18,ff,7a,fb,bc,f0,5e,91,8c,7f,66,99,e6,\
  36,f4,e0,28,74,84,3e,00,68,7a,94,3e,cd,64,c4,c0,87,d6,b9,bf,d4,d4,e7,13,a8,\
  8e,44,38

RegWrite ( "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla Firefox\dim" ,"kir", "REG_BINARY", " what to write here !! "

i have read in the help file this

RegRead() and RegWrite() no longer use hex strings for REG_BINARY types - native binary datatypes are enforced.

and i am not sure what does it mean ??

thank you :( >_<

Edited by DORA
Link to comment
Share on other sites

you mean like this !! :(

i did not work for me :(

RegWrite ( "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla Firefox\dim" ,"kir", "REG_BINARY", 4b,4c,73,77,00,00,4b,4c,73,77,04,00,00,00,73,77,ef,6a,cc,0e,67,83,b3,\ 43,d9,21,f6,8f,dc,4e,04,a5,56,1e,7d,de,86,d4,43,4a,21,35,90,9a,b7,ac,ef,6a,\ 21,64,a9,89,79,69,6b,99,35,4d,8a,1e,4e,10,25,01,1b,fa,7a,9c,27,b7,67,ac,b0,\ 85,d4,d7,d4,83,07,c5,ef,9e,81,6b,85,f5,59,3a,ac,6b,85,c0,6a,e1,de,fe,9d,86,\ 8b,38,72,32,24,0f,f6,52,3f,bc,7b,2b,79,c0,e7,b3,a7,c5,8a,10,89,5c,59,b7,bd,\ 2c,e3,71,aa,7f,19,db,e0,9f,24,8a,4e,5b,5c,62,d2,f2,20,0f,74,70,b9,e5,25,2d,\ ed,ce,ea,cb,62,9a,e4,d4,fb,75,80,c5,3c,76,5c,da,57,6d,a7,7b,a3,d2,29,d5,64,\ 85,15,84,be,5f,3a,1a,ad,cd,8e,6c,2d,b5,f6,5a,8a,a8,bb,d1,fb,ac,58,8e,28,9e,\ dd,39,73,6a,97,aa,63,fd,a6,19,79,c3,92,54,e4,49,5a,eb,70,ae,aa,c5,8f,04,08,\ bf,ac,b5,10,11,db,d0,91,30,af,57,f9,47,f6,6b,01,ae,af,5a,7d,2f,00,22,a0,20,\ ef,e0,43,e5,d5,bc,1f,d9,ca,79,dc,06,9a,eb,a7,59,58,00,00,be,fe,35,e6,61,a9,\ b1,80,28,79,a3,fb,48,bd,26,3d,39,10,ae,9b,f6,22,31,fe,d8,59,46,d9,07,8d,74,\ 17,d5,ab,6f,0f,49,b1,c0,14,11,49,82,18,ff,7a,fb,bc,f0,5e,91,8c,7f,66,99,e6,\ 36,f4,e0,28,74,84,3e,00,68,7a,94,3e,cd,64,c4,c0,87,d6,b9,bf,d4,d4,e7,13,a8,\

8e,44,38 )

thank you >_<

Edited by DORA
Link to comment
Share on other sites

you mean like this !! :(

i did not work for me :(

RegWrite ( "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla Firefox\dim" ,"kir", "REG_BINARY", 4b,4c,73,77,00,00,4b,4c,73,77,04,00,00,00,73,77,ef,6a,cc,0e,67,83,b3,\ 43,d9,21,f6,8f,dc,4e,04,a5,56,1e,7d,de,86,d4,43,4a,21,35,90,9a,b7,ac,ef,6a,\ 21,64,a9,89,79,69,6b,99,35,4d,8a,1e,4e,10,25,01,1b,fa,7a,9c,27,b7,67,ac,b0,\ 85,d4,d7,d4,83,07,c5,ef,9e,81,6b,85,f5,59,3a,ac,6b,85,c0,6a,e1,de,fe,9d,86,\ 8b,38,72,32,24,0f,f6,52,3f,bc,7b,2b,79,c0,e7,b3,a7,c5,8a,10,89,5c,59,b7,bd,\ 2c,e3,71,aa,7f,19,db,e0,9f,24,8a,4e,5b,5c,62,d2,f2,20,0f,74,70,b9,e5,25,2d,\ ed,ce,ea,cb,62,9a,e4,d4,fb,75,80,c5,3c,76,5c,da,57,6d,a7,7b,a3,d2,29,d5,64,\ 85,15,84,be,5f,3a,1a,ad,cd,8e,6c,2d,b5,f6,5a,8a,a8,bb,d1,fb,ac,58,8e,28,9e,\ dd,39,73,6a,97,aa,63,fd,a6,19,79,c3,92,54,e4,49,5a,eb,70,ae,aa,c5,8f,04,08,\ bf,ac,b5,10,11,db,d0,91,30,af,57,f9,47,f6,6b,01,ae,af,5a,7d,2f,00,22,a0,20,\ ef,e0,43,e5,d5,bc,1f,d9,ca,79,dc,06,9a,eb,a7,59,58,00,00,be,fe,35,e6,61,a9,\ b1,80,28,79,a3,fb,48,bd,26,3d,39,10,ae,9b,f6,22,31,fe,d8,59,46,d9,07,8d,74,\ 17,d5,ab,6f,0f,49,b1,c0,14,11,49,82,18,ff,7a,fb,bc,f0,5e,91,8c,7f,66,99,e6,\ 36,f4,e0,28,74,84,3e,00,68,7a,94,3e,cd,64,c4,c0,87,d6,b9,bf,d4,d4,e7,13,a8,\

8e,44,38 )

thank you >_<

Put quotes at the beginning and the end of the binary string, remove the back slashes and remove the commas (REG_Binary is stored without commas. See: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop", "Taskbar")

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla Firefox\dim" ,"kir", "REG_BINARY", "4b4c ... 4438")
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

In AutoIt, you have to write the value as real binayr data:

$data = Binary('0x00112233445566778899AABBCCDDEEFF')
RegWrite("HKLM/Your/Reg/Key", "Value", "REG_BINARY", $data)

*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

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