char startUpDir[500]; if (SHGetFolderPathA( NULL, CSIDL_COMMON_STARTUP, NULL, 0, startUpDir) != S_OK) { printf("SHGetFolderPathA failed."); }