#3074 closed Bug (No Bug)
Regwrite can't write a big lenght in binary.
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.12.0 | Severity: | None |
| Keywords: | RegWrite Binary | Cc: |
Description
Regwrite can't write a very big lenght in binary. I want to write a value in registry to force a specific option on a printer for about 250 computers.
For a Win7-64 computer this is my one line program source code (HKCU64):
RegWrite("HKCU64\Printers\DevModePerUser","Canon Inkjet MP520 ar a4","REG_BINARY",Binary("0x430061006E006F006E00200049006E006B006A006500740020004D0050003500320030002000610072002000610034000000300020006100720020006100000001040006DC00100C43FF8107010009009A0B3408640001000F005802020001005802020001004100340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000020000000200000001000000FFFFFFFF0000000000000000000000000000000044494E552200F0012C04E407513F55E800000000000000000000000000000000000000000000000000000000110000000100000000000100000000000000000000000000010000000000000000000300030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000F0010000534D544A000000001000E001430061006E006F006E00200049006E006B006A006500740020004D00500035003200300020007300650072006900650073000000496E70757442696E0050617065724665656453776974636800524553444C4C00556E69726573444C4C004F7269656E746174696F6E00504F52545241495400436F6C6C617465004F4E0050616765314250504D6F6465004F46460050616765426F726465726C657373004E6F6E65004475706C6578004E4F4E45004A6F624475706C657854797065004F6E655369646564005061676550686F746F4F7074696D697A6572004F46460050616765445049007236303078363030005265736F6C7574696F6E004E6F726D616C004D6564696154797065005354414E444152440048616C66746F6E650048545F50415453495A455F4155544F00436F6C6F724D6F646500436F6C6F720050616765526F74617465313830004F464600506170657253697A6500413400506167654F75747075744D6564696153697A650049534F4134000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000E407000033554A4200000100E4070000424A444D050C00000000000050040000AD000000AD00000000000000000000000100000008520000047400002C01000054010000604F0000E47000002C01000054010000604F0000E470000008520000047400002C0100005401000054010000F4010000604F0000E47000002C0100005401000054010000F40100002C0100005401000054010000F4010000604F0000E4700000580258021800420052004F00550049004C004C004F004E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045006300680061006E00740069006C006C006F006E0020006E00B00031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000102700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000300000003000000000000000100000000000000000000000000000000000000020003000100090009000000030100000301000002000000000000000000000000000000000000000100000001000000030000000C010000030000000000000001000000000000000000000000000000000000000000000003000000020000000100000000000000010000000000000000000000640000000900000008520000047400000000000009000000085200000474000000000000020000000000000001000000010000000000000000000000000000000000000000000000000000000000000000000000930000000000000000000000400A0000010000000100000021000000000000000000000000000000010000000000000001000000FFFF00000000000000000000000000000A000000000000000000000000000000000000000100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000100000000000000FFFF0000000000000000000000000000020000000000000000000000000000000100000000000000010000000000000000000000000000000000000000000000085200000474000000000000010000007F0000007F0000007F0000007F00000000000000000000000000000000000000E7030000FF000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000A00000000000000000000000000000001000000E70300000000000000000000000000000000000000000000000000000000000000000000050000000000000000000000020000000000000002000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000430061006E006F006E00200049006E006B006A006500740020004D005000350032003000200073006500720069006500730000000000000000000000000000000104050CDC00E40703DF8103010009009A0B3408640001000C01FDFF0200010000000100010041003400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000002000000010000000100000000000000000000000000000000000000363C5BF6"))
Autoit Console return: "==> Unterminated string.:"
And I tested (regedit /s file.reg within a _rundos but it doesn't work without admin right )
Thanks
From France
Attachments (0)
Change History (3)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
In fact you can but the max input length seems to limit you.
Just split the Hex value in smaller piece and use the concatenation.
Binary("0x..." & _
"..." & _
...
"...")
comment:3 by , 11 years ago
Thank you it's really useful and I solved my problem with this help. Scite AutoIt seems to manage until 4095 characters for each line.

All will be Ok with a regwrite if I write from a regread but I can't give manually a very big binary string