Jump to content

Regwrite issue with hex value


Recommended Posts

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation","Support","REG_SZ", "4f,00,70,00,65,00,72,00,61,00,74,00,69,00,6e,00,67,00,20,00,48,00,6f,00,75,00,72,00,73,00,20,00,61,00,72,00,65,00,20,00,4d,00,6f,00,6e,00,64,00,61,00,79,00,20,00,74,00,6f,00,20,00,46,00,72,00,69,00,64,00,61,00,79,00,2c,00,20,00,38,00,3a,00,33,00,30,00,61,00,6d,00,20,00,74,00,6f,00,20,00,35,00,3a,00,30,00,30,00,70,00,6d,00,20,00,4d,00,53,00,54,00,2e,00,0d,00,0a,00,\
41,00,66,00,74,00,65,00,72,00,20,00,48,00,6f,00,75,00,72,00,73,00,2f,00,57,00,65,00,65,00,6b,00,65,00,6e,00,64,00,2f,00,48,00,6f,00,6c,00,69,00,64,00,61,00,79,00,20,00,74,00,65,00,63,00,68,00,6e,00,69,00,63,00,61,00,6c,00,20,00,73,00,75,00,70,00,70,00,6f,00,72,00,74,00,20,00,69,00,73,00,20,00,61,00,76,00,61,00,69,00,6c,00,61,00,62,00,6c,00,65,00,20,00,37,00,3a,00,30,00,30,00,61,00,6d,00,20,00,74,00,6f,00,20,00,31,00,31,00,3a,00,30,00,30,00,70,00,6d,00,20,00,4d,00,53,00,54,00,2e,00,0d,00,0a,00,\
00,00"

This is what i am trying to do. unfortunatly it doesn't format it properly when it get input into the registry.

but if I do it this way it works:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation]
"Support"=hex(1):4f,00,70,00,65,00,72,00,61,00,74,00,69,00,6e,00,67,00,20,00,48,00,6f,00,75,00,72,00,73,00,20,00,61,00,72,00,65,00,20,00,4d,00,6f,00,6e,00,64,00,61,00,79,00,20,00,74,00,6f,00,20,00,46,00,72,00,69,00,64,00,61,00,79,00,2c,00,20,00,38,00,3a,00,33,00,30,00,61,00,6d,00,20,00,74,00,6f,00,20,00,35,00,3a,00,30,00,30,00,70,00,6d,00,20,00,4d,00,53,00,54,00,2e,00,0d,00,0a,00,\
41,00,66,00,74,00,65,00,72,00,20,00,48,00,6f,00,75,00,72,00,73,00,2f,00,57,00,65,00,65,00,6b,00,65,00,6e,00,64,00,2f,00,48,00,6f,00,6c,00,69,00,64,00,61,00,79,00,20,00,74,00,65,00,63,00,68,00,6e,00,69,00,63,00,61,00,6c,00,20,00,73,00,75,00,70,00,70,00,6f,00,72,00,74,00,20,00,69,00,73,00,20,00,61,00,76,00,61,00,69,00,6c,00,61,00,62,00,6c,00,65,00,20,00,37,00,3a,00,30,00,30,00,61,00,6d,00,20,00,74,00,6f,00,20,00,31,00,31,00,3a,00,30,00,30,00,70,00,6d,00,20,00,4d,00,53,00,54,00,2e,00,0d,00,0a,00,\
00,00

is there a way to tell the input that the value is hex, I have also tried to append the =hex(1): but it still doesn't work

 

Thanks

Link to comment
Share on other sites

Hello. maybe you can do a forum search before ask. there is a lot of topics about over the forum...

 

Saludos

Link to comment
Share on other sites

I am actually trying to do muti-line reg_sz and when I do it with the reg file it works but I just tried the way that was suggested and since it is now a reg_binary it doesn't pull the information at all

 

#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=bintest.Exe
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation","SupportHours","REG_Binary","0x4f7065726174696e6720486f75727320617265204d6f6e64617920746f204672696461792c20383a3330616d20746f20353a3030706d204d53542e0d0a416674657220486f7572732f5765656b656e642f486f6c6964617920746563686e6963616c20737570706f727420697320617661696c61626c6520373a3030616d20746f2031313a3030706d204d53542e0d0a")

 

Link to comment
Share on other sites

Did you try with a REG_MULTI_SZ type ? It works for me :

#RequireAdmin
#AutoIt3Wrapper_UseX64=y

$sSupportHours = "Operating Hours are Monday to Friday, 8:30am to 5:00pm MST." & @LF & _
           "After Hours/Weekend/Holiday technical support is available 7:00am to 11:00pm MST."

$ret = RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\-OEMInformation-","SupportHours","REG_MULTI_SZ",$sSupportHours)

 

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