// Notify all windows that environment variables may have changed. #include int main() { DWORD dwReturnValue; if (SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) "Environment", SMTO_ABORTIFHUNG, 5000, &dwReturnValue)) return 0; else return 1; }