"You there! In back!! Pay attention!
Now class, lets get back to the topic at hand - Methods of Debugging scripts."

A common way of debugging is to place the commands in quotes, and stick a CRLF (?) at the end so you see what the script is trying to do, rather than guessing why the script is throwing errors. As you pointed out earlier, a single character can be enough to cause a problem, but how will you know which char, or whether it is an extra or missing char?
Also - the syntax displayed in my example should be able to be executed at the command line after "net" - for example:
"Use D: " $mapstring ?
displays
Use D: \\server\share
You could copy that screen output, type "Net " and paste the copied output, resulting in
Net Use D: \\server\share
Does the native O/S command work as expected? If it doesn't, the Kix commands certainly can't.
Glenn
_________________________
Actually I
am a Rocket Scientist!