Use window text to get the current directory for running command prompt, since this works on both XP and Windows 7.