https://git.reactos.org/?p=reactos.git;a=commitdiff;h=90c63d12a1960b75b518a…
commit 90c63d12a1960b75b518ac8e9dad81efce5a7fac
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Thu Nov 14 23:25:21 2019 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Thu Nov 14 23:25:21 2019 +0900
[SHELL32][BOOTDATA] Implement Command Prompt here (#2029)
Add "Command Prompt here" menu item to the Right-click menu of normal
folders and drives. Currently, this menu item doesn't work correctly because of the
bug of pushd. CORE-12150
---
boot/bootdata/hivecls.inf | 16 ++++++++
dll/win32/shell32/CDefaultContextMenu.cpp | 65 ++++++++++++++++++-------------
dll/win32/shell32/lang/bg-BG.rc | 1 +
dll/win32/shell32/lang/ca-ES.rc | 1 +
dll/win32/shell32/lang/cs-CZ.rc | 1 +
dll/win32/shell32/lang/da-DK.rc | 1 +
dll/win32/shell32/lang/de-DE.rc | 1 +
dll/win32/shell32/lang/el-GR.rc | 1 +
dll/win32/shell32/lang/en-GB.rc | 1 +
dll/win32/shell32/lang/en-US.rc | 1 +
dll/win32/shell32/lang/es-ES.rc | 1 +
dll/win32/shell32/lang/et-EE.rc | 1 +
dll/win32/shell32/lang/fi-FI.rc | 1 +
dll/win32/shell32/lang/fr-FR.rc | 1 +
dll/win32/shell32/lang/he-IL.rc | 1 +
dll/win32/shell32/lang/hi-IN.rc | 1 +
dll/win32/shell32/lang/hu-HU.rc | 1 +
dll/win32/shell32/lang/id-ID.rc | 1 +
dll/win32/shell32/lang/it-IT.rc | 1 +
dll/win32/shell32/lang/ja-JP.rc | 1 +
dll/win32/shell32/lang/ko-KR.rc | 1 +
dll/win32/shell32/lang/nl-NL.rc | 1 +
dll/win32/shell32/lang/no-NO.rc | 1 +
dll/win32/shell32/lang/pl-PL.rc | 1 +
dll/win32/shell32/lang/pt-BR.rc | 1 +
dll/win32/shell32/lang/pt-PT.rc | 1 +
dll/win32/shell32/lang/ro-RO.rc | 1 +
dll/win32/shell32/lang/ru-RU.rc | 1 +
dll/win32/shell32/lang/sk-SK.rc | 1 +
dll/win32/shell32/lang/sl-SI.rc | 1 +
dll/win32/shell32/lang/sq-AL.rc | 1 +
dll/win32/shell32/lang/sv-SE.rc | 1 +
dll/win32/shell32/lang/tr-TR.rc | 1 +
dll/win32/shell32/lang/uk-UA.rc | 1 +
dll/win32/shell32/lang/zh-CN.rc | 1 +
dll/win32/shell32/lang/zh-TW.rc | 1 +
dll/win32/shell32/shlexec.cpp | 40 ++++++++++++++++++-
dll/win32/shell32/shresdef.h | 1 +
38 files changed, 129 insertions(+), 27 deletions(-)
diff --git a/boot/bootdata/hivecls.inf b/boot/bootdata/hivecls.inf
index d3ae861c06b..d2cd5bada57 100644
--- a/boot/bootdata/hivecls.inf
+++ b/boot/bootdata/hivecls.inf
@@ -26,6 +26,22 @@
HKCR,"Folder\shell\explore","BrowserFlags",0x00010001,"0x00000022"
HKCR,"Folder\shell\explore","ExplorerFlags",0x00010001,"0x00000021"
HKCR,"Folder\shell\explore\command","",0x00000000,"explorer.exe
/e,""%1"""
+; Directory
+HKCR,"Directory","",0x00000000,"File Folder"
+;HKCR,"Directory\DefaultIcon","",0x00000000,"%SystemRoot%\system32\shell32.dll,-4"
+HKCR,"Directory","AlwaysShowExt",0x00000000,""
+HKCR,"Directory","NoRecentDocs",0x00000000,""
+HKCR,"Directory\shell\cmd","",0x00020000,"(a)%SystemRoot%\system32\shell32.dll,-306"
+HKCR,"Directory\shell\cmd","Extended",0x00000000,""
+HKCR,"Directory\shell\cmd\command","",0x00000000,"cmd /s /k
pushd ""%V"""
+
+; Drive
+HKCR,"Drive","",0x00000000,"Drive"
+;HKCR,"Drive\DefaultIcon","",0x00000000,"%SystemRoot%\system32\shell32.dll,-4"
+HKCR,"Drive\shell\cmd","",0x00020000,"(a)%SystemRoot%\system32\shell32.dll,-306"
+HKCR,"Drive\shell\cmd","Extended",0x00000000,""
+HKCR,"Drive\shell\cmd\command","",0x00000000,"cmd /s /k pushd
""%V"""
+
; Clipboard Element
HKCR,".clp","",0x00000000,"clpfile"
HKCR,".clp","Content
Type",0x00000000,"application/x-msclip"
diff --git a/dll/win32/shell32/CDefaultContextMenu.cpp
b/dll/win32/shell32/CDefaultContextMenu.cpp
index aa250481a08..31edee28e7d 100644
--- a/dll/win32/shell32/CDefaultContextMenu.cpp
+++ b/dll/win32/shell32/CDefaultContextMenu.cpp
@@ -562,49 +562,62 @@ CDefaultContextMenu::AddStaticContextMenusToMenu(
/* By default use verb for menu item name */
mii.dwTypeData = pEntry->szVerb;
+ WCHAR wszKey[256];
+ HRESULT hr;
+ hr = StringCbPrintfW(wszKey, sizeof(wszKey), L"shell\\%s",
pEntry->szVerb);
+ if (FAILED_UNEXPECTEDLY(hr))
+ {
+ pEntry = pEntry->pNext;
+ continue;
+ }
+
+ BOOL Extended = FALSE;
+ HKEY hkVerb;
if (idResource > 0)
{
if (LoadStringW(shell32_hInstance, idResource, wszVerb, _countof(wszVerb)))
mii.dwTypeData = wszVerb; /* use translated verb */
else
ERR("Failed to load string\n");
+
+ LONG res = RegOpenKeyW(pEntry->hkClass, wszKey, &hkVerb);
+ if (res == ERROR_SUCCESS)
+ {
+ res = RegQueryValueExW(hkVerb, L"Extended", NULL, NULL, NULL,
NULL);
+ Extended = (res == ERROR_SUCCESS);
+
+ RegCloseKey(hkVerb);
+ }
}
else
{
- WCHAR wszKey[256];
- HRESULT hr = StringCbPrintfW(wszKey, sizeof(wszKey), L"shell\\%s",
pEntry->szVerb);
-
- if (SUCCEEDED(hr))
+ LONG res = RegOpenKeyW(pEntry->hkClass, wszKey, &hkVerb);
+ if (res == ERROR_SUCCESS)
{
- HKEY hkVerb;
DWORD cbVerb = sizeof(wszVerb);
- LONG res = RegOpenKeyW(pEntry->hkClass, wszKey, &hkVerb);
+ res = RegLoadMUIStringW(hkVerb, NULL, wszVerb, cbVerb, NULL, 0, NULL);
if (res == ERROR_SUCCESS)
{
- res = RegLoadMUIStringW(hkVerb,
- NULL,
- wszVerb,
- cbVerb,
- NULL,
- 0,
- NULL);
- if (res == ERROR_SUCCESS)
- {
- /* use description for the menu entry */
- mii.dwTypeData = wszVerb;
- }
-
- RegCloseKey(hkVerb);
+ /* use description for the menu entry */
+ mii.dwTypeData = wszVerb;
}
+
+ res = RegQueryValueExW(hkVerb, L"Extended", NULL, NULL, NULL,
NULL);
+ Extended = (res == ERROR_SUCCESS);
+
+ RegCloseKey(hkVerb);
}
}
- mii.cch = wcslen(mii.dwTypeData);
- mii.fState = fState;
- mii.wID = iIdCmdFirst + cIds;
- InsertMenuItemW(hMenu, *pIndexMenu, TRUE, &mii);
- (*pIndexMenu)++;
- cIds++;
+ if (!Extended || GetAsyncKeyState(VK_SHIFT) < 0)
+ {
+ mii.cch = wcslen(mii.dwTypeData);
+ mii.fState = fState;
+ mii.wID = iIdCmdFirst + cIds;
+ InsertMenuItemW(hMenu, *pIndexMenu, TRUE, &mii);
+ (*pIndexMenu)++;
+ cIds++;
+ }
pEntry = pEntry->pNext;
diff --git a/dll/win32/shell32/lang/bg-BG.rc b/dll/win32/shell32/lang/bg-BG.rc
index e61b6c675fb..42d1fb138bf 100644
--- a/dll/win32/shell32/lang/bg-BG.rc
+++ b/dll/win32/shell32/lang/bg-BG.rc
@@ -911,6 +911,7 @@ BEGIN
IDS_EDIT_VERB "Обработка"
IDS_FIND_VERB "Търсене"
IDS_PRINT_VERB "Разпечатване"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u файла, %u папки"
IDS_PRINTERS "Печатачи"
diff --git a/dll/win32/shell32/lang/ca-ES.rc b/dll/win32/shell32/lang/ca-ES.rc
index b2e25f93076..5f01647f972 100644
--- a/dll/win32/shell32/lang/ca-ES.rc
+++ b/dll/win32/shell32/lang/ca-ES.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Edit"
IDS_FIND_VERB "Find"
IDS_PRINT_VERB "Print"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Files, %u Folders"
IDS_PRINTERS "Printers"
diff --git a/dll/win32/shell32/lang/cs-CZ.rc b/dll/win32/shell32/lang/cs-CZ.rc
index b5f4c2c2616..c668b7b14d8 100644
--- a/dll/win32/shell32/lang/cs-CZ.rc
+++ b/dll/win32/shell32/lang/cs-CZ.rc
@@ -916,6 +916,7 @@ BEGIN
IDS_EDIT_VERB "Upravit"
IDS_FIND_VERB "Najít"
IDS_PRINT_VERB "Tisknout"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u souborů, %u složek"
IDS_PRINTERS "Tiskárny"
diff --git a/dll/win32/shell32/lang/da-DK.rc b/dll/win32/shell32/lang/da-DK.rc
index 7a063778cab..30172aed75d 100644
--- a/dll/win32/shell32/lang/da-DK.rc
+++ b/dll/win32/shell32/lang/da-DK.rc
@@ -916,6 +916,7 @@ BEGIN
IDS_EDIT_VERB "Edit"
IDS_FIND_VERB "Find"
IDS_PRINT_VERB "Print"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Files, %u Folders"
IDS_PRINTERS "Printers"
diff --git a/dll/win32/shell32/lang/de-DE.rc b/dll/win32/shell32/lang/de-DE.rc
index f0145f348be..1f6b2cc673d 100644
--- a/dll/win32/shell32/lang/de-DE.rc
+++ b/dll/win32/shell32/lang/de-DE.rc
@@ -911,6 +911,7 @@ BEGIN
IDS_EDIT_VERB "Bearbeiten"
IDS_FIND_VERB "Finden"
IDS_PRINT_VERB "Drucken"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Dateien, %u Ordner"
IDS_PRINTERS "Drucker"
diff --git a/dll/win32/shell32/lang/el-GR.rc b/dll/win32/shell32/lang/el-GR.rc
index aaf9db3c3b7..5196614198a 100644
--- a/dll/win32/shell32/lang/el-GR.rc
+++ b/dll/win32/shell32/lang/el-GR.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Edit"
IDS_FIND_VERB "Find"
IDS_PRINT_VERB "Print"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Files, %u Folders"
IDS_PRINTERS "Printers"
diff --git a/dll/win32/shell32/lang/en-GB.rc b/dll/win32/shell32/lang/en-GB.rc
index 7eb8229884e..5d4cf6bc4a9 100644
--- a/dll/win32/shell32/lang/en-GB.rc
+++ b/dll/win32/shell32/lang/en-GB.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Edit"
IDS_FIND_VERB "Find"
IDS_PRINT_VERB "Print"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Files, %u Folders"
IDS_PRINTERS "Printers"
diff --git a/dll/win32/shell32/lang/en-US.rc b/dll/win32/shell32/lang/en-US.rc
index bce8bc31278..f50562a6982 100644
--- a/dll/win32/shell32/lang/en-US.rc
+++ b/dll/win32/shell32/lang/en-US.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Edit"
IDS_FIND_VERB "Find"
IDS_PRINT_VERB "Print"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Files, %u Folders"
IDS_PRINTERS "Printers"
diff --git a/dll/win32/shell32/lang/es-ES.rc b/dll/win32/shell32/lang/es-ES.rc
index 1464b4d14f0..12e5e17d7d8 100644
--- a/dll/win32/shell32/lang/es-ES.rc
+++ b/dll/win32/shell32/lang/es-ES.rc
@@ -918,6 +918,7 @@ BEGIN
IDS_EDIT_VERB "Editar"
IDS_FIND_VERB "Buscar"
IDS_PRINT_VERB "Imprimir"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u archivos, %u carpetas"
IDS_PRINTERS "Impresoras"
diff --git a/dll/win32/shell32/lang/et-EE.rc b/dll/win32/shell32/lang/et-EE.rc
index e2e8cf41e28..63b137c76df 100644
--- a/dll/win32/shell32/lang/et-EE.rc
+++ b/dll/win32/shell32/lang/et-EE.rc
@@ -917,6 +917,7 @@ BEGIN
IDS_EDIT_VERB "Muuda"
IDS_FIND_VERB "Leia"
IDS_PRINT_VERB "Prindi"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Faili, %u Kausta"
IDS_PRINTERS "Printerid"
diff --git a/dll/win32/shell32/lang/fi-FI.rc b/dll/win32/shell32/lang/fi-FI.rc
index f6cd13e6878..5fc6ddfadf4 100644
--- a/dll/win32/shell32/lang/fi-FI.rc
+++ b/dll/win32/shell32/lang/fi-FI.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Edit"
IDS_FIND_VERB "Find"
IDS_PRINT_VERB "Print"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Files, %u Folders"
IDS_PRINTERS "Printers"
diff --git a/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc
index 58464c856ff..e5d0e25e44f 100644
--- a/dll/win32/shell32/lang/fr-FR.rc
+++ b/dll/win32/shell32/lang/fr-FR.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Éditer"
IDS_FIND_VERB "Chercher"
IDS_PRINT_VERB "Imprimer"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u fichiers, %u répertoires"
IDS_PRINTERS "Imprimantes"
diff --git a/dll/win32/shell32/lang/he-IL.rc b/dll/win32/shell32/lang/he-IL.rc
index 9e63d54b428..e9e64d7eafe 100644
--- a/dll/win32/shell32/lang/he-IL.rc
+++ b/dll/win32/shell32/lang/he-IL.rc
@@ -912,6 +912,7 @@ BEGIN
IDS_EDIT_VERB "ערוך"
IDS_FIND_VERB "מצא"
IDS_PRINT_VERB "הדפס"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u קבצים, %u תיקיות"
IDS_PRINTERS "מדפסות"
diff --git a/dll/win32/shell32/lang/hi-IN.rc b/dll/win32/shell32/lang/hi-IN.rc
index 6903fe2372e..7e637bad1c5 100644
--- a/dll/win32/shell32/lang/hi-IN.rc
+++ b/dll/win32/shell32/lang/hi-IN.rc
@@ -905,6 +905,7 @@ BEGIN
IDS_EDIT_VERB "संपादित करें"
IDS_FIND_VERB "ढूंढे"
IDS_PRINT_VERB "प्रिंट"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u फ़ाइलें, %u फ़ोल्डर"
IDS_PRINTERS "प्रिंटर"
diff --git a/dll/win32/shell32/lang/hu-HU.rc b/dll/win32/shell32/lang/hu-HU.rc
index 037d7f8e4c9..1c9f001830e 100644
--- a/dll/win32/shell32/lang/hu-HU.rc
+++ b/dll/win32/shell32/lang/hu-HU.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Edit"
IDS_FIND_VERB "Find"
IDS_PRINT_VERB "Print"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Files, %u Folders"
IDS_PRINTERS "Printers"
diff --git a/dll/win32/shell32/lang/id-ID.rc b/dll/win32/shell32/lang/id-ID.rc
index 4d5abb5d14e..c9736262764 100644
--- a/dll/win32/shell32/lang/id-ID.rc
+++ b/dll/win32/shell32/lang/id-ID.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Edit"
IDS_FIND_VERB "Cari"
IDS_PRINT_VERB "Cetak"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Berkas, %u Folder"
IDS_PRINTERS "Printer"
diff --git a/dll/win32/shell32/lang/it-IT.rc b/dll/win32/shell32/lang/it-IT.rc
index fa5cd0d287e..7a854349b50 100644
--- a/dll/win32/shell32/lang/it-IT.rc
+++ b/dll/win32/shell32/lang/it-IT.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Modifica"
IDS_FIND_VERB "Cerca"
IDS_PRINT_VERB "Stampa"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u File, %u Cartelle"
IDS_PRINTERS "Stampanti"
diff --git a/dll/win32/shell32/lang/ja-JP.rc b/dll/win32/shell32/lang/ja-JP.rc
index 56a7ca99a3d..9c2732f4a09 100644
--- a/dll/win32/shell32/lang/ja-JP.rc
+++ b/dll/win32/shell32/lang/ja-JP.rc
@@ -907,6 +907,7 @@ BEGIN
IDS_EDIT_VERB "編集"
IDS_FIND_VERB "検索"
IDS_PRINT_VERB "印刷"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u 個のファイル、 %u 個のフォルダ"
IDS_PRINTERS "プリンタ"
diff --git a/dll/win32/shell32/lang/ko-KR.rc b/dll/win32/shell32/lang/ko-KR.rc
index 4239b7e3da5..3b33cefd7fe 100644
--- a/dll/win32/shell32/lang/ko-KR.rc
+++ b/dll/win32/shell32/lang/ko-KR.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Edit"
IDS_FIND_VERB "Find"
IDS_PRINT_VERB "Print"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Files, %u Folders"
IDS_PRINTERS "Printers"
diff --git a/dll/win32/shell32/lang/nl-NL.rc b/dll/win32/shell32/lang/nl-NL.rc
index cb9ec3ef3e9..e7a697f12da 100644
--- a/dll/win32/shell32/lang/nl-NL.rc
+++ b/dll/win32/shell32/lang/nl-NL.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Edit"
IDS_FIND_VERB "Find"
IDS_PRINT_VERB "Print"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Files, %u Folders"
IDS_PRINTERS "Printers"
diff --git a/dll/win32/shell32/lang/no-NO.rc b/dll/win32/shell32/lang/no-NO.rc
index 16c0a4333ea..51d999b495b 100644
--- a/dll/win32/shell32/lang/no-NO.rc
+++ b/dll/win32/shell32/lang/no-NO.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Rediger"
IDS_FIND_VERB "Finn"
IDS_PRINT_VERB "Skriv ut"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u filer, %u mapper"
IDS_PRINTERS "Skrivere"
diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc
index 38724ea0bbd..7c0cc733c22 100644
--- a/dll/win32/shell32/lang/pl-PL.rc
+++ b/dll/win32/shell32/lang/pl-PL.rc
@@ -915,6 +915,7 @@ BEGIN
IDS_EDIT_VERB "Edytuj"
IDS_FIND_VERB "Wyszukaj"
IDS_PRINT_VERB "Drukuj"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Plików, %u Katalogów"
IDS_PRINTERS "Drukarki"
diff --git a/dll/win32/shell32/lang/pt-BR.rc b/dll/win32/shell32/lang/pt-BR.rc
index 035a4ae514a..c34ae71fc0d 100644
--- a/dll/win32/shell32/lang/pt-BR.rc
+++ b/dll/win32/shell32/lang/pt-BR.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Editar"
IDS_FIND_VERB "Procurar"
IDS_PRINT_VERB "Imprimir"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Arquivos, %u Pastas"
IDS_PRINTERS "Impressoras"
diff --git a/dll/win32/shell32/lang/pt-PT.rc b/dll/win32/shell32/lang/pt-PT.rc
index 685f86cf1bc..6560b089148 100644
--- a/dll/win32/shell32/lang/pt-PT.rc
+++ b/dll/win32/shell32/lang/pt-PT.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Editar"
IDS_FIND_VERB "Procurar"
IDS_PRINT_VERB "Imprimir"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Ficheiros, %u Pastas"
IDS_PRINTERS "Impressoras"
diff --git a/dll/win32/shell32/lang/ro-RO.rc b/dll/win32/shell32/lang/ro-RO.rc
index 5d6c56c8a7c..a3dfce4391b 100644
--- a/dll/win32/shell32/lang/ro-RO.rc
+++ b/dll/win32/shell32/lang/ro-RO.rc
@@ -912,6 +912,7 @@ BEGIN
IDS_EDIT_VERB "Editează"
IDS_FIND_VERB "Caută"
IDS_PRINT_VERB "Imprimă"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u fișiere, %u dosare"
IDS_PRINTERS "Imprimante"
diff --git a/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc
index 36002d87d62..46b397572aa 100644
--- a/dll/win32/shell32/lang/ru-RU.rc
+++ b/dll/win32/shell32/lang/ru-RU.rc
@@ -917,6 +917,7 @@ BEGIN
IDS_EDIT_VERB "Изменить"
IDS_FIND_VERB "Поиск"
IDS_PRINT_VERB "Печать"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u файлов, %u папок"
IDS_PRINTERS "Принтеры"
diff --git a/dll/win32/shell32/lang/sk-SK.rc b/dll/win32/shell32/lang/sk-SK.rc
index 165f210a79d..01000ca3e98 100644
--- a/dll/win32/shell32/lang/sk-SK.rc
+++ b/dll/win32/shell32/lang/sk-SK.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Upraviť"
IDS_FIND_VERB "Find"
IDS_PRINT_VERB "Tlačiť"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "súbory: %u, priečinky: %u"
IDS_PRINTERS "Tlačiarne"
diff --git a/dll/win32/shell32/lang/sl-SI.rc b/dll/win32/shell32/lang/sl-SI.rc
index 678c5f5f7be..640f4cb7e5b 100644
--- a/dll/win32/shell32/lang/sl-SI.rc
+++ b/dll/win32/shell32/lang/sl-SI.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Edit"
IDS_FIND_VERB "Find"
IDS_PRINT_VERB "Print"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Files, %u Folders"
IDS_PRINTERS "Printers"
diff --git a/dll/win32/shell32/lang/sq-AL.rc b/dll/win32/shell32/lang/sq-AL.rc
index f65bf86b3f2..fe6992e9834 100644
--- a/dll/win32/shell32/lang/sq-AL.rc
+++ b/dll/win32/shell32/lang/sq-AL.rc
@@ -914,6 +914,7 @@ BEGIN
IDS_EDIT_VERB "Modifiko"
IDS_FIND_VERB "Gjej"
IDS_PRINT_VERB "Printo"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Dokumenta, %u Dosje"
IDS_PRINTERS "Printera"
diff --git a/dll/win32/shell32/lang/sv-SE.rc b/dll/win32/shell32/lang/sv-SE.rc
index e17328ecc79..06749268ad7 100644
--- a/dll/win32/shell32/lang/sv-SE.rc
+++ b/dll/win32/shell32/lang/sv-SE.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Redigera"
IDS_FIND_VERB "Hitta"
IDS_PRINT_VERB "Skriv ut"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u filer, %u mappar"
IDS_PRINTERS "Skrivare"
diff --git a/dll/win32/shell32/lang/tr-TR.rc b/dll/win32/shell32/lang/tr-TR.rc
index bc6addfed2b..88449402f00 100644
--- a/dll/win32/shell32/lang/tr-TR.rc
+++ b/dll/win32/shell32/lang/tr-TR.rc
@@ -912,6 +912,7 @@ BEGIN
IDS_EDIT_VERB "Düzenle"
IDS_FIND_VERB "Bul"
IDS_PRINT_VERB "Yazdır"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u Kütük, %u Dizin"
IDS_PRINTERS "Yazıcılar"
diff --git a/dll/win32/shell32/lang/uk-UA.rc b/dll/win32/shell32/lang/uk-UA.rc
index 97ec05510e7..faa2254e158 100644
--- a/dll/win32/shell32/lang/uk-UA.rc
+++ b/dll/win32/shell32/lang/uk-UA.rc
@@ -910,6 +910,7 @@ BEGIN
IDS_EDIT_VERB "Змінити"
IDS_FIND_VERB "Пошук"
IDS_PRINT_VERB "Друк"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u файлів, %u папок"
IDS_PRINTERS "Принтери"
diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc
index f3debf50826..af8f3c41076 100644
--- a/dll/win32/shell32/lang/zh-CN.rc
+++ b/dll/win32/shell32/lang/zh-CN.rc
@@ -920,6 +920,7 @@ BEGIN
IDS_EDIT_VERB "编辑"
IDS_FIND_VERB "查找"
IDS_PRINT_VERB "打印"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u 个文件,%u 个文件夹"
IDS_PRINTERS "打印机"
diff --git a/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc
index 31faf69e845..a9cf8074ce1 100644
--- a/dll/win32/shell32/lang/zh-TW.rc
+++ b/dll/win32/shell32/lang/zh-TW.rc
@@ -921,6 +921,7 @@ BEGIN
IDS_EDIT_VERB "編輯"
IDS_FIND_VERB "搜索"
IDS_PRINT_VERB "列印"
+ IDS_CMD_VERB "Command Prompt here"
IDS_FILE_FOLDER "%u 個檔案, %u 個檔案夾"
IDS_PRINTERS "印表機"
diff --git a/dll/win32/shell32/shlexec.cpp b/dll/win32/shell32/shlexec.cpp
index 5a741467cb0..049426dd7da 100644
--- a/dll/win32/shell32/shlexec.cpp
+++ b/dll/win32/shell32/shlexec.cpp
@@ -3,7 +3,7 @@
*
* Copyright 1998 Marcus Meissner
* Copyright 2002 Eric Pouech
- * Copyright 2018 Katayama Hirofumi MZ
+ * Copyright 2018-2019 Katayama Hirofumi MZ
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -167,6 +167,8 @@ static void ParseTildeEffect(PWSTR &res, LPCWSTR &args, DWORD
&len, DWORD &used,
* %I address of a global item ID (explorer switch /idlist)
* %L seems to be %1 as long filename followed by the 8+3 variation
* %S ???
+ * %W Working directory
+ * %V Use either %L or %W
* %* all following parameters (see batfile)
*
* The way we parse the command line arguments was determined through extensive
@@ -302,6 +304,42 @@ static BOOL SHELL_ArgifyW(WCHAR* out, DWORD len, const WCHAR* fmt,
const WCHAR*
found_p1 = TRUE;
break;
+ case 'w':
+ case 'W':
+ if (lpDir)
+ {
+ used += wcslen(lpDir);
+ if (used < len)
+ {
+ wcscpy(res, lpDir);
+ res += wcslen(lpDir);
+ }
+ }
+ break;
+
+ case 'v':
+ case 'V':
+ if (lpFile)
+ {
+ used += wcslen(lpFile);
+ if (used < len)
+ {
+ wcscpy(res, lpFile);
+ res += wcslen(lpFile);
+ }
+ found_p1 = TRUE;
+ }
+ else if (lpDir)
+ {
+ used += wcslen(lpDir);
+ if (used < len)
+ {
+ wcscpy(res, lpDir);
+ res += wcslen(lpDir);
+ }
+ }
+ break;
+
case 'i':
case 'I':
if (pidl)
diff --git a/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h
index 2b729d6a2ea..3e425eac704 100644
--- a/dll/win32/shell32/shresdef.h
+++ b/dll/win32/shell32/shresdef.h
@@ -200,6 +200,7 @@
#define IDS_EDIT_VERB 303
#define IDS_FIND_VERB 304
#define IDS_PRINT_VERB 305
+#define IDS_CMD_VERB 306
#define IDS_FILE_FOLDER 308
#define IDS_CREATELINK 309