From 708da63009e5917306902e4c41fe2032c227ab06 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 19 Jan 2019 00:28:34 +0300 Subject: Toaster: fix for Start Menu folder path detection --- plugins/Toaster/src/utils.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/Toaster/src/utils.cpp') diff --git a/plugins/Toaster/src/utils.cpp b/plugins/Toaster/src/utils.cpp index 7726eec8c5..9751dcb13f 100644 --- a/plugins/Toaster/src/utils.cpp +++ b/plugins/Toaster/src/utils.cpp @@ -1,14 +1,12 @@ #include "stdafx.h" -#define SHORTCUT_PATH "\\Microsoft\\Windows\\Start Menu\\Programs\\Miranda NG.lnk" - using namespace Microsoft::WRL; wchar_t* GetShortcutPath() { wchar_t path[MAX_PATH]; - GetEnvironmentVariable(L"APPDATA", path, MAX_PATH); - wcscat_s(path, _T(SHORTCUT_PATH)); + SHGetSpecialFolderPathW(nullptr, path, CSIDL_STARTMENU, FALSE); + wcscat_s(path, L"\\Programs\\Miranda NG.lnk"); return mir_wstrdup(path); } -- cgit v1.2.3