diff --git a/plugins/windows-notification/api/src/shortcutcreator.cpp b/plugins/windows-notification/api/src/shortcutcreator.cpp index 0042d45d..8a8cc3b9 100644 --- a/plugins/windows-notification/api/src/shortcutcreator.cpp +++ b/plugins/windows-notification/api/src/shortcutcreator.cpp @@ -125,7 +125,8 @@ int32_t ValidateShortcut(const std::wstring& shortcut_path, const std::wstring& return hr; } -bool ImplEnsureAumiddedShortcutExists(const char *const aumid) +static bool ImplEnsureAumiddedShortcutExists( + const std::string_view menu_rel_path, const std::string_view aumid) { auto waumid = sview_to_wstr(aumid); if (waumid.empty()) @@ -135,7 +136,8 @@ bool ImplEnsureAumiddedShortcutExists(const char *const aumid) auto exePath = GetExePath(); - auto path = GetEnv(L"APPDATA") + LR"(\Microsoft\Windows\Start Menu\Programs\Dino.lnk)"; + auto path = GetEnv(L"APPDATA") + LR"(\Microsoft\Windows\Start Menu\)" + + sview_to_wstr(menu_rel_path) + L".lnk"; if (!std::filesystem::exists(path)) { return SUCCEEDED(InstallShortcut(exePath, waumid, path)); @@ -150,6 +152,7 @@ extern "C" { gboolean EnsureAumiddedShortcutExists(const gchar* aumid) noexcept { - return g_try_invoke(ImplEnsureAumiddedShortcutExists, aumid); + return g_try_invoke( + ImplEnsureAumiddedShortcutExists, R"(Programs\Dino)", aumid); } } diff --git a/plugins/windows-notification/api/src/win32.cpp b/plugins/windows-notification/api/src/win32.cpp index 1c0f4b9a..8b8e411e 100644 --- a/plugins/windows-notification/api/src/win32.cpp +++ b/plugins/windows-notification/api/src/win32.cpp @@ -39,7 +39,7 @@ std::wstring GetEnv(const wchar_t *const variable_name) return buf; } -bool ImplSetProcessAumid(const char *const aumid) +static bool ImplSetProcessAumid(const std::string_view aumid) { auto waumid = sview_to_wstr(aumid); if (waumid.empty())