Jump to content

Recommended Posts

Posted (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 by gcue
Posted

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?

Posted

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.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Posted (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)

:blink:

Edit: Larry already saved it! ;)

Edited 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
Posted

actually that didnt work.

number($reg) shows the right value but when i regwrite that.. it doesnt work... did it work for you?

Posted

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 =/

Posted

ok this worked:

RegWrite value "0x" & Hex(int($reg))

thanks again for your help fellas =)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...