in reply to Current working directory on win32
You will probably see why it is not working when you run it from the command line by printing out $0 at some point int your program.
/J\