I don't know why %username% sometimes does not work in batch files but if you use it in kix scripts you might want to take a look at the ExpandEnvironmentVariables function.

Oh, and I guess it's a typo but in your last example the ending quote is misplaced.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.