gcue Posted July 20, 2010 Posted July 20, 2010 (edited) i am looking at a remote pc registry entry $reg = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Office12-HP4350DTN\PrinterDriverData", "Forms?") it returns a value of "2173314341" when i write that value RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Office14-HP4350DTN\PrinterDriverData", "Forms?", "REG_DWORD", $reg) the value changes to "2147483648" any ideas? Edited July 20, 2010 by gcue
LarryDalooza Posted July 20, 2010 Posted July 20, 2010 Is it a DWORD? Because the max value of a DWORD is 2147483647. Check the value again... is it a DWORD? Lar. AutoIt has helped make me wealthy
gcue Posted July 20, 2010 Author Posted July 20, 2010 it is a DWORD.. so if that's the max value for a dword, how would i be able to write values that exceed that?
LarryDalooza Posted July 20, 2010 Posted July 20, 2010 I am sorry... I am incorrect. ... just use Number($reg) RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Office14-HP4350DTN\PrinterDriverData", "Forms?", "REG_DWORD", Number($reg)) Lar. AutoIt has helped make me wealthy
PsaltyDS Posted July 20, 2010 Posted July 20, 2010 (edited) It's an unsigned 32-bit value, so the max value is 2^32 - 1 = 4294967295 (4Gig) = 0xFFFFFFFF: $reg = 4294967295 RegWrite("HKCU\SOFTWARE\AutoIt v3", "TestData", "REG_DWORD", $reg) Edit: Larry already saved it! Edited July 20, 2010 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
gcue Posted July 20, 2010 Author Posted July 20, 2010 actually that didnt work. number($reg) shows the right value but when i regwrite that.. it doesnt work... did it work for you?
gcue Posted July 20, 2010 Author Posted July 20, 2010 i am able to get the HEX value doing this: Hex(int($reg)) but when i try to regwrite that as a value, it writes it as a string so its still wrong =/
gcue Posted July 20, 2010 Author Posted July 20, 2010 ok this worked: RegWrite value "0x" & Hex(int($reg)) thanks again for your help fellas =)
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