Please use the code tags next time you post code so the formatting gets preserved and it's much more readable.

Looking at your script you are trying to distibute kix2exe (Kix2Exe by Senser). Why? All your users need to make exe files from kix scripts? Please tell us a bit more about what you are trying to do. And post the entire code because in the code above I do not see where $debug gets set.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.