Jump to content
Sign in to follow this  
lulu

RegWrite and Binary

Recommended Posts

lulu

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

Share this post


Link to post
Share on other sites
Authenticity

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

Share this post


Link to post
Share on other sites
trancexx

And you don't even neen Binary() function since that's done internally.

RegWrite($regValName, "TestXrxDeviceSettings", "Reg_Binary", "0x1234567821436587")

Edited by trancexx

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
lulu

And you don't even neen Binary() function since that's done internally.

RegWrite($regValName, "TestXrxDeviceSettings", "Reg_Binary", "0x1234567821436587")

You are correct, Sir. I really only needed the "0x"

Thanks

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.