Increase USERCMD/BAR line and command line length limits

Here you can propose new features, make suggestions etc.

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8412
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Increase USERCMD/BAR line and command line length limits

Post by *MVV » 2018-05-19, 10:15 UTC

It seems that TC only reads 2048 characters from USERCMD/BAR parameters because longer lines are truncated, also button bar editor doesn't allow typing more than 260 characters into command field and more than 2048 characters into parameters field.

Please increase these limits (INI string length limit and command/parameters fields length) to at least 4096 characters because modern Windows versions do not limit command lines to 2048 characters, command line may be much longer.

User avatar
petermad
Power Member
Power Member
Posts: 8998
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Post by *petermad » 2018-05-19, 13:18 UTC

Support+
License #524 (1994)
Danish Total Commander Translator
TC 9.5b8 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38451
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-05-21, 07:19 UTC

The problem is that each section in the ini files is limited to 64kBytes. If I allow too many characters, this would fill up too quickly.

Just put the command in a lnk file and refer to that instead of the program directly.
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8412
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2018-05-21, 10:51 UTC

Please leave this problem for a user, one will want to have 1000 little commands, another one may want to have 5 commands with 4k command lines... And, third one will use buttonbars with extra long commands. There is a limit in Windows INI format, so TC shouldn't add more limits (260 character limit for command field and 2048 character limit for parameters field). But you can warn user if he creates em-command and his INI is close to this limit.

Workarounds are not too much good: BAT has blinking black window, no Unicode support and problems with escaping, LNK is not portable and doesn't allow to insert TC parameters, and it doesn't allow typing more than 260 characters in command line...

Broken button example (command line is cut after "/s /"):

Code: Select all

Command: AskParam.exe
Parameters=/u"Internet Explorer: {871C5380-42A0-1069-A2EA-08002B30309D}" /t"AutoPlay: {9C60DE1E-E5FC-40f4-A487-460851A8D915}" /t"Administrative Tools: {D20EA4E1-3957-11d2-A40B-0C5020524153}" /t"Libraries: {031E4825-7B94-4dc3-B131-E946B44C8DD5}" /t"Windows Firewall: {4026492F-2F69-46B8-B9BF-5654FC07E423}"  /t"All Tasks: {ED7BA470-8E54-465E-825C-99712043E01C}" /t"All Control Panel Items: {21EC2020-3AEA-1069-A2DD-08002B30309D}" /t"Location and Other Sensors: {E9950154-C418-419e-A90A-20C5287AE24B}" /t"Credential Manager: {1206F5F1-0569-412C-8FEC-3204630DFB70}" /t"HomeGroup: {67CA7650-96E6-4FDD-BB43-A8E774F73A57}" /t"HomeGroup folder: {6785BFAC-9D2D-4be5-B7E2-59937E8FB80A}" /t"Games: {ED228FDF-9EA8-4870-83b1-96b02CFE0D52}" /t"Favorites: {323CA680-C24D-4099-B94D-446DD2D7249E}" /t"Computer: {20D04FE0-3AEA-1069-A2D8-08002B30309D}" /t"Recycle Bin: {645FF040-5081-101B-9F08-00AA002F954E}" /t"My Documents: {450D8FBA-AD25-11D0-98A8-0800361B1103}" /t"Recent Places: {22877a6d-37a1-461a-91b0-dbda5aaebc99}" /t"Public: {4336a54d-038b-4685-ab02-99bb52d3fb8b}" /t"Control Panel (Category): {26EE0668-A00A-44D7-9371-BEB064C98683}" /t"Folder Options: {6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}" /t"Tablet PC Settings: {80F3F1D5-FECA-45F3-BC32-752C152E456E}" /t"Font settings: {93412589-74D4-4E4E-AD0E-E0CB621440FD}" /t"Portable Devices: {35786D3C-B075-49b9-88DD-029876E11C01}" /t"Pen and Touch: {F82DF8F7-8B9F-442E-A48C-818EA735FF9B}" /t"Personalization: {ED834ED6-4B5A-4bfe-8F11-A626DCB6A921}" /t"Remote Desktop Connection: {241D7C96-F8BF-4F85-B01F-E2B043341A4B}" /t"Search: {2559a1f0-21d7-11d4-bdaf-00c04f60b9f0}" /t"Get Programs: {15eae92e-f17a-4431-9f28-805e482dafd4}" /t"Printers: {2227A280-3AEA-1069-A2DE-08002B30309D}" /t"Programs and Features: {7b81be6a-ce2b-4676-a29e-eb907a5126c5}" /t"Default Programs: {17cd9488-1228-4b2f-88ce-4298e93e0966}" /t"Desktop: {3080F90D-D7AD-11D9-BD98-0000947B0257}" /t"Speech Recognition: {58E3C745-D971-4081-9034-86E34B30836A}" /t"Default Location: {00C6D95F-329C-409a-81D7-C46C66EA7F33}" /p(h) %%COMMANDER_EXE%% /L=::"%%1" /s /t /o

Post Reply