diff options
author | George Hazan <ghazan@miranda.im> | 2019-01-19 00:28:34 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-01-19 00:28:34 +0300 |
commit | 708da63009e5917306902e4c41fe2032c227ab06 (patch) | |
tree | 7771eafb349b0ae6090ccf88baaeb4ffa05cdfa4 /plugins/Toaster/src/utils.cpp | |
parent | 79c8ff11ee17dbc4d08523c76cdbb2590097e838 (diff) |
Toaster: fix for Start Menu folder path detection
Diffstat (limited to 'plugins/Toaster/src/utils.cpp')
-rw-r--r-- | plugins/Toaster/src/utils.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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);
}
|