Set CMDER_START to USER_PROFILE if no path given.

This commit is contained in:
Martin Kemp 2016-01-15 12:10:24 +00:00
parent 4dc1249881
commit 9c7a037948

View File

@ -158,12 +158,10 @@ void StartCmder(std::wstring path, bool is_single_mode)
{
SetEnvironmentVariable(L"CMDER_START", path.c_str());
}
// Send out the Settings Changed message - Once using ANSII...
//SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_ABORTIFHUNG, 5000, NULL);
// ...and once using UniCode (because Windows 8 likes it that way).
//SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) L"Environment", SMTO_ABORTIFHUNG, 5000, NULL);
else
{
SetEnvironmentVariable(L"CMDER_START", GetEnvironmentVariable(L"USER_PROFILE"));
}
STARTUPINFO si = { 0 };
si.cb = sizeof(STARTUPINFO);