GetModuleFileName Do a search and it's dead simple.

PS: I only give the function and say "search for it" because that way you find other related things that MSDN has to offer while looking at other support functions.