What\'s the Lua to get the current working directory on Windows XP SP3 (or to get the directory of the currently-running Lua file)? I prefer not to use LuaFileSyste
I haven't had time to test this, but have you tried os.getenv to read windows environment variables?
Windows has an environment variable for current directory: %CD%
os.getenv("CD")
Edit: Tested on Windows 7 and while other environment variables work (ie. %USERNAME% or %PROGRAMFILES%) the CD var returns nil