summaryrefslogtreecommitdiff
path: root/plugins/Toaster/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Toaster/src')
-rw-r--r--plugins/Toaster/src/stdafx.h1
-rw-r--r--plugins/Toaster/src/utils.cpp6
2 files changed, 3 insertions, 4 deletions
diff --git a/plugins/Toaster/src/stdafx.h b/plugins/Toaster/src/stdafx.h
index 460861ee91..aecd986516 100644
--- a/plugins/Toaster/src/stdafx.h
+++ b/plugins/Toaster/src/stdafx.h
@@ -5,6 +5,7 @@
#include <wrl/implements.h>
#include <windows.ui.notifications.h>
+#include <ShlObj.h>
#include <ShObjIdl.h>
#include <propvarutil.h>
#include <memory>
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);
}