//c:/windows/system32
CString FileUtil::GetSystem32Dir() {
CString strPath;
::GetSystemDirectory(strPath.GetBuffer(_MAX_PATH), _MAX_PATH);
strPath.ReleaseBuffer();
MessageBox(NULL,LPCTSTR(strPath), "SysPath", MB_OK);

return strPath;
}

//C:\Program Files
CString FileUtil::GetProgarmeFile() {
CString sPath;

SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, 0, sPath.GetBuffer(MAX_PATH));

sPath.ReleaseBuffer();

return sPath;
}

//<user name>\Local Settings\Applicaiton Data (non roaming)
CString FileUtil::GetAPPLocal() {
CString sPath;

SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, sPath.GetBuffer(MAX_PATH));

sPath.ReleaseBuffer();

return sPath;
}

留待后查,同时方便他人