Jump to content

RegWrite and Binary


lulu
 Share

Recommended Posts

I am executing the following code in a script:

If Not $printer = "" Then

$regValName = StringFormat("%s%s\\PrinterDriverData", $regKey, $ColorMFDs[$i])

MsgBox(0,'','This is $regValName: ' & $regValName)

RegWrite($regValName, "TestXrxDeviceSettings", "Reg_Binary", "00 10 20")

EndIf

The RegWrite line works just fine, excpet that 00 10 20 value appears to be written in as decimal. The value in binary, which actutally seems to be displayed as hex, ends up as 30 30 20 31 30 20 32 30. Please view the attached Word doc to see an image of the registry value. I want the 00 10 20 value to show up in the middle section, not on the far right. Any help is appreciated.

RegValue.doc

Link to comment
Share on other sites

If the value is in the range 0-0xFFFFFFFF then it's possible to do it this way:

; Edit: Wrong. 
;~ RegWrite($regValName, "TestXrxDeviceSettings", "Reg_Binary", 0x001020)

; Should be 0x20100000 because of little endianess. Just use Binary function.

; If bigger the 0xFFFFFFFF then this one is possible:
RegWrite($regValName, "TestXrxDeviceSettings", "Reg_Binary", Binary("0x1234567821436587"))
Edited by Authenticity
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...