Guest JaimitoP Posted October 18, 2007 Posted October 18, 2007 Hi all, I've read a MS article ( Article ID: 830473 ) that CMD is limited to 2047 bytes; that limit works when i type all those characters in a CMD window. It also worked when a legacy app uses CMD to run a command (it was about 4 months). Server and client stations have always been W2K SP4, with all critical updates installed until today... But now, the same legacy app can issue a 4060-byte lon command string with no problem!!!! Does any one of you geniuses know if it's been modfied in a W2K update/service pack? I made some chages/restrictions into my app based on 2047 limit and now i have to explain why thaty limit has benn iincreased!!!! Help PLease!!! Thanks
Guest John John Posted October 18, 2007 Posted October 18, 2007 Re: CMD command string limit - 2047 bytes The article says that the limit is 2047 *characters* , it says nothing about *byte* length. If you are using 8-bit character set then the limit would fall at 2047 bytes but if you use 16-bit character set then the limit, byte wise would be twice as much. It doesn't say anything in the article about single or double byte characters, nor the length byte wise. I can only assume that Microsoft took that into consideration when they designed it, if not our Asian friends would be limited to a length of 1023.5 characters... John John JaimitoP wrote: > Hi all, > I've read a MS article ( Article ID: 830473 ) that CMD is limited to 2047 > bytes; that limit works when i type all those characters in a CMD window. It > also worked when a legacy app uses CMD to run a command (it was about 4 > months). > > Server and client stations have always been W2K SP4, with all critical > updates installed until today... > > But now, the same legacy app can issue a 4060-byte lon command string with > no problem!!!! > Does any one of you geniuses know if it's been modfied in a W2K > update/service pack? > I made some chages/restrictions into my app based on 2047 limit and now i > have to explain why thaty limit has benn iincreased!!!! > Help PLease!!! > Thanks
Guest JaimitoP Posted October 18, 2007 Posted October 18, 2007 Re: CMD command string limit - 2047 bytes John John, thanks for your answer. OK, i admit it, i'm "mixing" two thigs in one. When i say "bytes", i mean "characters". All the description refers to a string length (number of characters). But the question reamins: "Have MS changed the limit for CMD command-line string length for Win 2K?" Thanks again "John John" wrote: > The article says that the limit is 2047 *characters* , it says nothing > about *byte* length. If you are using 8-bit character set then the > limit would fall at 2047 bytes but if you use 16-bit character set then > the limit, byte wise would be twice as much. It doesn't say anything in > the article about single or double byte characters, nor the length byte > wise. I can only assume that Microsoft took that into consideration > when they designed it, if not our Asian friends would be limited to a > length of 1023.5 characters... > > John > > John > > JaimitoP wrote: > > > Hi all, > > I've read a MS article ( Article ID: 830473 ) that CMD is limited to 2047 > > bytes; that limit works when i type all those characters in a CMD window. It > > also worked when a legacy app uses CMD to run a command (it was about 4 > > months). > > > > Server and client stations have always been W2K SP4, with all critical > > updates installed until today... > > > > But now, the same legacy app can issue a 4060-byte lon command string with > > no problem!!!! > > Does any one of you geniuses know if it's been modfied in a W2K > > update/service pack? > > I made some chages/restrictions into my app based on 2047 limit and now i > > have to explain why thaty limit has benn iincreased!!!! > > Help PLease!!! > > Thanks > >
Guest John John Posted October 18, 2007 Posted October 18, 2007 Re: CMD command string limit - 2047 bytes I don't know, someone else might have an answer. Someone could always test with a maximum string length and find out, maybe: echo 12345678901234567890123456789012345678901234567789012.... John JaimitoP wrote: > John John, thanks for your answer. > OK, i admit it, i'm "mixing" two thigs in one. When i say "bytes", i mean > "characters". All the description refers to a string length (number of > characters). > But the question reamins: "Have MS changed the limit for CMD command-line > string length for Win 2K?" > > Thanks again > > "John John" wrote: > > >>The article says that the limit is 2047 *characters* , it says nothing >>about *byte* length. If you are using 8-bit character set then the >>limit would fall at 2047 bytes but if you use 16-bit character set then >>the limit, byte wise would be twice as much. It doesn't say anything in >>the article about single or double byte characters, nor the length byte >>wise. I can only assume that Microsoft took that into consideration >>when they designed it, if not our Asian friends would be limited to a >>length of 1023.5 characters... >> >>John >> >>John >> >>JaimitoP wrote: >> >> >>>Hi all, >>>I've read a MS article ( Article ID: 830473 ) that CMD is limited to 2047 >>>bytes; that limit works when i type all those characters in a CMD window. It >>>also worked when a legacy app uses CMD to run a command (it was about 4 >>>months). >>> >>>Server and client stations have always been W2K SP4, with all critical >>>updates installed until today... >>> >>>But now, the same legacy app can issue a 4060-byte lon command string with >>>no problem!!!! >>>Does any one of you geniuses know if it's been modfied in a W2K >>>update/service pack? >>>I made some chages/restrictions into my app based on 2047 limit and now i >>>have to explain why thaty limit has benn iincreased!!!! >>>Help PLease!!! >>>Thanks >> >>
Guest JaimitoP Posted October 18, 2007 Posted October 18, 2007 Re: CMD command string limit - 2047 bytes Thanks for your time.... "John John" wrote: > I don't know, someone else might have an answer. Someone could always > test with a maximum string length and find out, maybe: > > echo 12345678901234567890123456789012345678901234567789012.... > > John > > JaimitoP wrote: > > > John John, thanks for your answer. > > OK, i admit it, i'm "mixing" two thigs in one. When i say "bytes", i mean > > "characters". All the description refers to a string length (number of > > characters). > > But the question reamins: "Have MS changed the limit for CMD command-line > > string length for Win 2K?" > > > > Thanks again > > > > "John John" wrote: > > > > > >>The article says that the limit is 2047 *characters* , it says nothing > >>about *byte* length. If you are using 8-bit character set then the > >>limit would fall at 2047 bytes but if you use 16-bit character set then > >>the limit, byte wise would be twice as much. It doesn't say anything in > >>the article about single or double byte characters, nor the length byte > >>wise. I can only assume that Microsoft took that into consideration > >>when they designed it, if not our Asian friends would be limited to a > >>length of 1023.5 characters... > >> > >>John > >> > >>John > >> > >>JaimitoP wrote: > >> > >> > >>>Hi all, > >>>I've read a MS article ( Article ID: 830473 ) that CMD is limited to 2047 > >>>bytes; that limit works when i type all those characters in a CMD window. It > >>>also worked when a legacy app uses CMD to run a command (it was about 4 > >>>months). > >>> > >>>Server and client stations have always been W2K SP4, with all critical > >>>updates installed until today... > >>> > >>>But now, the same legacy app can issue a 4060-byte lon command string with > >>>no problem!!!! > >>>Does any one of you geniuses know if it's been modfied in a W2K > >>>update/service pack? > >>>I made some chages/restrictions into my app based on 2047 limit and now i > >>>have to explain why thaty limit has benn iincreased!!!! > >>>Help PLease!!! > >>>Thanks > >> > >> > >
Recommended Posts