From fab895bd9b523d9bdd371e6d40b3cd4a2fc99dbd Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Mon, 8 Feb 2016 22:09:35 +0000 Subject: [PATCH] Undo. --- launcher/src/CmderLauncher.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 510d8ad..b2b0ffa 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -3,7 +3,6 @@ #include #include "resource.h" #include -#include #pragma comment(lib, "Shlwapi.lib") @@ -162,16 +161,6 @@ void StartCmder(std::wstring path, bool is_single_mode) MessageBox(NULL, _T("Error trying to set CMDER_START to given path!"), _T("Error"), MB_OK); } } - else - { - wchar_t* homeProfile = 0; - SHGetKnownFolderPath(FOLDERID_Profile, 0, NULL, &homeProfile); - if (!SetEnvironmentVariable(L"CMDER_START", homeProfile)) { - MessageBox(NULL, _T("Error trying to set CMDER_START to USER_PROFILE!"), _T("Error"), MB_OK); - } - CoTaskMemFree(static_cast(homeProfile)); - } - // Ensure EnvironmentVariables are propagated. SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_ABORTIFHUNG, 5000, NULL); SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) L"Environment", SMTO_ABORTIFHUNG, 5000, NULL); // For Windows >= 8