From a22072eba79d7b925522cd6735109174309ea5ad Mon Sep 17 00:00:00 2001 From: DietmarSchwertberger Date: Sun, 8 Nov 2026 20:58:48 +0100 Subject: [PATCH 1/2] Expand folder shortcuts: open folder path instead of the submenu item --- Src/StartMenu/StartMenuDLL/MenuCommands.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Src/StartMenu/StartMenuDLL/MenuCommands.cpp b/Src/StartMenu/StartMenuDLL/MenuCommands.cpp index ac35f04f7..7ea84c291 100644 --- a/Src/StartMenu/StartMenuDLL/MenuCommands.cpp +++ b/Src/StartMenu/StartMenuDLL/MenuCommands.cpp @@ -3117,12 +3117,15 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p info.lpVerbW=MAKEINTRESOURCEW(res-verbOffset); info.nShow=SW_SHOWNORMAL; bool bOpenTruePath=false; + bool bOpenFolderPath=false; wchar_t targetlnkPath[_MAX_PATH]; // path to target.lnk in a fake folder wchar_t dir[_MAX_PATH]; if (SHGetPathFromIDList(pItemPidl1,dir)) { if (_stricmp(command,"open")==0 && GetSettingBool(L"OpenTruePath") && GetFakeFolder(targetlnkPath,_countof(targetlnkPath),dir)) bOpenTruePath=true; + else if (_stricmp(command,"open")==0 && GetSettingBool(L"OpenTruePath") && (GetFileAttributes(dir)==FILE_ATTRIBUTE_DIRECTORY)) + bOpenFolderPath=true; else { PathRemoveFileSpec(dir); @@ -3170,6 +3173,12 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p LOG_MENU(LOG_EXECUTE,L"Invoke command, ptr=%p, res=%d",this,hinst); executeSuccess=static_cast(reinterpret_cast(hinst))>=32; } + else if (bOpenFolderPath) + { + HINSTANCE hinst = ShellExecute(NULL,NULL,dir,NULL,NULL,SW_SHOWNORMAL); + LOG_MENU(LOG_EXECUTE, L"Invoke command, ptr=%p, res=%d",this,hinst); + executeSuccess = static_cast(reinterpret_cast(hinst)) >= 32; + } else { HRESULT hr{}; From ff69309c70332b37f2743e8914e5d03692db1298 Mon Sep 17 00:00:00 2001 From: DietmarSchwertberger Date: Sun, 8 Nov 2026 22:49:50 +0100 Subject: [PATCH 2/2] fix check for directory --- Src/StartMenu/StartMenuDLL/MenuCommands.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/StartMenu/StartMenuDLL/MenuCommands.cpp b/Src/StartMenu/StartMenuDLL/MenuCommands.cpp index 7ea84c291..ab79eb477 100644 --- a/Src/StartMenu/StartMenuDLL/MenuCommands.cpp +++ b/Src/StartMenu/StartMenuDLL/MenuCommands.cpp @@ -3123,9 +3123,9 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p if (SHGetPathFromIDList(pItemPidl1,dir)) { if (_stricmp(command,"open")==0 && GetSettingBool(L"OpenTruePath") && GetFakeFolder(targetlnkPath,_countof(targetlnkPath),dir)) - bOpenTruePath=true; - else if (_stricmp(command,"open")==0 && GetSettingBool(L"OpenTruePath") && (GetFileAttributes(dir)==FILE_ATTRIBUTE_DIRECTORY)) - bOpenFolderPath=true; + bOpenTruePath = true; + else if (_stricmp(command,"open")==0 && GetSettingBool(L"OpenTruePath") && ((GetFileAttributes(dir)&FILE_ATTRIBUTE_DIRECTORY)==FILE_ATTRIBUTE_DIRECTORY)) + bOpenFolderPath = true; else { PathRemoveFileSpec(dir);