reg: Output the number of matches when querying the registry recursively.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2016-05-02 12:06:23 +00:00 committed by Alexandre Julliard
parent 1df961bd3d
commit 43875a7fae
49 changed files with 193 additions and 0 deletions

View File

@ -11896,6 +11896,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "ال&سجل" msgstr "ال&سجل"

View File

@ -11512,6 +11512,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Регистър" msgstr "&Регистър"

View File

@ -11775,6 +11775,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registre" msgstr "&Registre"

View File

@ -11583,6 +11583,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registr" msgstr "&Registr"

View File

@ -11849,6 +11849,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Register" msgstr "&Register"

View File

@ -11753,6 +11753,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registrierung" msgstr "&Registrierung"

View File

@ -11298,6 +11298,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "" msgstr ""

View File

@ -11647,6 +11647,10 @@ msgstr ""
"reg: Unable to complete the specified operation. An unexpected error " "reg: Unable to complete the specified operation. An unexpected error "
"occurred.\n" "occurred.\n"
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr "Search complete. Number of matches found: %1!d!\n"
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registry" msgstr "&Registry"

View File

@ -11647,6 +11647,10 @@ msgstr ""
"reg: Unable to complete the specified operation. An unexpected error " "reg: Unable to complete the specified operation. An unexpected error "
"occurred.\n" "occurred.\n"
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr "Search complete. Number of matches found: %1!d!\n"
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registry" msgstr "&Registry"

View File

@ -11202,6 +11202,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registrejo" msgstr "&Registrejo"

View File

@ -11928,6 +11928,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registro" msgstr "&Registro"

View File

@ -11292,6 +11292,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "" msgstr ""

View File

@ -11626,6 +11626,10 @@ msgstr ""
"reg: Määrätyn toiminnon suorittaminen ei onnistu. Tapahtui odottamaton " "reg: Määrätyn toiminnon suorittaminen ei onnistu. Tapahtui odottamaton "
"virhe.\n" "virhe.\n"
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Rekisteri" msgstr "&Rekisteri"

View File

@ -11787,6 +11787,10 @@ msgstr ""
"reg : Impossible d'effectuer l'opération spécifiée. Une erreur inattendue " "reg : Impossible d'effectuer l'opération spécifiée. Une erreur inattendue "
"est survenue.\n" "est survenue.\n"
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registre" msgstr "&Registre"

View File

@ -11673,6 +11673,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&רישום המערכת" msgstr "&רישום המערכת"

View File

@ -11099,6 +11099,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "" msgstr ""

View File

@ -11406,6 +11406,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registar" msgstr "&Registar"

View File

@ -11843,6 +11843,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Fájl" msgstr "&Fájl"

View File

@ -11929,6 +11929,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registro" msgstr "&Registro"

View File

@ -11629,6 +11629,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "レジストリ(&R)" msgstr "レジストリ(&R)"

View File

@ -11918,6 +11918,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "레지스트리(&R)" msgstr "레지스트리(&R)"

View File

@ -11651,6 +11651,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "reg: Nepavyko užbaigti nurodytos operacijos. Įvyko netikėta klaida.\n" msgstr "reg: Nepavyko užbaigti nurodytos operacijos. Įvyko netikėta klaida.\n"
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "R&egistras" msgstr "R&egistras"

View File

@ -11099,6 +11099,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "" msgstr ""

View File

@ -11754,6 +11754,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Register" msgstr "&Register"

View File

@ -11895,6 +11895,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registerbestand" msgstr "&Registerbestand"

View File

@ -11099,6 +11099,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "" msgstr ""

View File

@ -11099,6 +11099,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "" msgstr ""

View File

@ -11731,6 +11731,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Rejestr" msgstr "&Rejestr"

View File

@ -11738,6 +11738,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registro" msgstr "&Registro"

View File

@ -11720,6 +11720,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registo" msgstr "&Registo"

View File

@ -11177,6 +11177,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "" msgstr ""

View File

@ -11939,6 +11939,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registru" msgstr "&Registru"

View File

@ -11648,6 +11648,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "reg: не удалось завершить операцию. Произошла непредвиденная ошибка.\n" msgstr "reg: не удалось завершить операцию. Произошла непредвиденная ошибка.\n"
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Реестр" msgstr "&Реестр"

View File

@ -11371,6 +11371,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Registry" msgstr "&Registry"

View File

@ -11872,6 +11872,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Register" msgstr "&Register"

View File

@ -11764,6 +11764,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "" msgstr ""

View File

@ -11903,6 +11903,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "" msgstr ""

View File

@ -11544,6 +11544,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Register" msgstr "&Register"

View File

@ -11099,6 +11099,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "" msgstr ""

View File

@ -11330,6 +11330,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "" msgstr ""

View File

@ -11700,6 +11700,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Kayıt" msgstr "&Kayıt"

View File

@ -11733,6 +11733,10 @@ msgid ""
msgstr "" msgstr ""
"reg: неможливо завершити зазначену операцію. Сталася неочікувана помилка.\n" "reg: неможливо завершити зазначену операцію. Сталася неочікувана помилка.\n"
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "&Реєстр" msgstr "&Реєстр"

View File

@ -11238,6 +11238,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "" msgstr ""

View File

@ -11035,6 +11035,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "" msgstr ""

View File

@ -11203,6 +11203,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "注册表(&R)" msgstr "注册表(&R)"

View File

@ -11803,6 +11803,10 @@ msgid ""
"occurred.\n" "occurred.\n"
msgstr "" msgstr ""
#: reg.rc:55
msgid "Search complete. Number of matches found: %1!d!\n"
msgstr ""
#: regedit.rc:34 #: regedit.rc:34
msgid "&Registry" msgid "&Registry"
msgstr "註冊表(&R)" msgstr "註冊表(&R)"

View File

@ -655,6 +655,8 @@ static WCHAR *build_subkey_path(WCHAR *path, DWORD path_len, WCHAR *subkey_name,
return subkey_path; return subkey_path;
} }
static unsigned int num_values_found = 0;
static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse) static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse)
{ {
LONG rc; LONG rc;
@ -689,6 +691,7 @@ static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse)
output_string(fmt, path); output_string(fmt, path);
output_value(value_name, type, data, data_size); output_value(value_name, type, data, data_size);
output_string(newlineW); output_string(newlineW);
num_values_found++;
} }
HeapFree(GetProcessHeap(), 0, data); HeapFree(GetProcessHeap(), 0, data);
@ -858,7 +861,11 @@ static int reg_query(WCHAR *key_name, WCHAR *value_name, BOOL value_empty, BOOL
} }
if (value_name || value_empty) if (value_name || value_empty)
{
ret = query_value(key, value_name, key_name, recurse); ret = query_value(key, value_name, key_name, recurse);
if (recurse)
output_message(STRING_MATCHES_FOUND, num_values_found);
}
else else
ret = query_all(key, key_name, recurse); ret = query_all(key, key_name, recurse);

View File

@ -46,3 +46,4 @@
#define STRING_INVALID_STRING 123 #define STRING_INVALID_STRING 123
#define STRING_VALUEALL_FAILED 124 #define STRING_VALUEALL_FAILED 124
#define STRING_GENERAL_FAILURE 125 #define STRING_GENERAL_FAILURE 125
#define STRING_MATCHES_FOUND 126

View File

@ -51,4 +51,5 @@ STRINGTABLE
STRING_INVALID_STRING, "reg: The option [/d] must be followed by a valid string\n" STRING_INVALID_STRING, "reg: The option [/d] must be followed by a valid string\n"
STRING_VALUEALL_FAILED, "reg: Unable to delete all registry values in '%1'. An unexpected error occurred.\n" STRING_VALUEALL_FAILED, "reg: Unable to delete all registry values in '%1'. An unexpected error occurred.\n"
STRING_GENERAL_FAILURE, "reg: Unable to complete the specified operation. An unexpected error occurred.\n" STRING_GENERAL_FAILURE, "reg: Unable to complete the specified operation. An unexpected error occurred.\n"
STRING_MATCHES_FOUND, "Search complete. Number of matches found: %1!d!\n"
} }