This is a very old pain on the ... !

It is because the way some guys at microsoft have written their programs !!! In fact there are many command line utilities that their end of line characters are only chr(13) instead of chr(10),chr(13) This is why you have this behaviour. Ipconfig (under win 2000 ) is an other one.

You have to chop - rip - hack (!) every whitespace character at the start and end of every line, before you can use these lines.

I do not know how to do it with kixtart but within Perl I use the following :

s/^\s*(.*)\s*$/\1/;