Possible Duplicate:
How to get the application executable name in Windows (C++ Win32 or C++/CLI)?
How can I get the current instance's file name & path from within my native win32 C++ application?
For example; if my application was c:\projects\testapps\getapppath.exe it would be able to tell the path is c:\projects\testapps\getapppath.exe