GetWindowsDirectory -> c:\windows or c:\
GetTempPath -> CurrentUser::%Tmp% || System::%Tmp% || CurrentUser::%Temp% || System::%Temp%
SHGetKnownFolderPath
Do Not use environment string for well-known directory any more, use this function instead.
#include <shlobj.h>
wchar_t *fullpath = NULL; SHGetKnownFolderPath(FOLDERID_ProgramFiles, 0, NULL, &fullpath); // C:\Program Files CoTaskMemFree(fullpath);