lulu Posted October 12, 2009 Share Posted October 12, 2009 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 More sharing options...
Authenticity Posted October 12, 2009 Share Posted October 12, 2009 (edited) 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 October 12, 2009 by Authenticity Link to comment Share on other sites More sharing options...
trancexx Posted October 12, 2009 Share Posted October 12, 2009 (edited) And you don't even neen Binary() function since that's done internally.RegWrite($regValName, "TestXrxDeviceSettings", "Reg_Binary", "0x1234567821436587") Edited October 12, 2009 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
lulu Posted October 12, 2009 Author Share Posted October 12, 2009 The Binary() function did the trick! Thanks Link to comment Share on other sites More sharing options...
lulu Posted October 12, 2009 Author Share Posted October 12, 2009 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 Link to comment Share on other sites More sharing options...
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