From e11d59357f48c84cef38d204999bdb2aa1d80152 Mon Sep 17 00:00:00 2001 From: kh1 Date: Thu, 1 Nov 2012 12:53:53 +0100 Subject: Force start menu cache update. Task-number: QTCREATORBUG-8145 Seems to be a known issue on at least Windows Vista. Change-Id: Ib3b6a405f704da991773cbe1ef3c16c1f763959c Reviewed-by: Tim Jenssen Reviewed-by: Robert Loehning --- src/libs/installer/createshortcutoperation.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/libs/installer/createshortcutoperation.cpp') diff --git a/src/libs/installer/createshortcutoperation.cpp b/src/libs/installer/createshortcutoperation.cpp index 0eebc9bcd..7c181290b 100644 --- a/src/libs/installer/createshortcutoperation.cpp +++ b/src/libs/installer/createshortcutoperation.cpp @@ -117,6 +117,16 @@ static bool createLink(const QString &fileName, const QString &linkName, QString ppf->Release(); } psl->Release(); + + PIDLIST_ABSOLUTE pidl; // Force start menu cache update + if (SUCCEEDED(SHGetKnownFolderIDList(FOLDERID_StartMenu, 0, 0, &pidl))) { + SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_IDLIST, pidl, 0); + CoTaskMemFree(pidl); + } + if (SUCCEEDED(SHGetKnownFolderIDList(FOLDERID_CommonStartMenu, 0, 0, &pidl))) { + SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_IDLIST, pidl, 0); + CoTaskMemFree(pidl); + } #else Q_UNUSED(arguments) Q_UNUSED(workingDir) -- cgit v1.2.3