Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com --- programs/reg/delete.c | 4 ++-- programs/reg/export.c | 2 +- programs/reg/query.c | 2 +- programs/reg/reg.rc | 1 + programs/reg/resource.h | 1 + 5 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/programs/reg/delete.c b/programs/reg/delete.c index 1f3755b3365..c80b622bccb 100644 --- a/programs/reg/delete.c +++ b/programs/reg/delete.c @@ -46,7 +46,7 @@ static int run_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name { if (RegDeleteTreeW(root, path) != ERROR_SUCCESS) { - output_message(STRING_CANNOT_FIND); + output_message(STRING_KEY_NONEXIST); return 1; } output_message(STRING_SUCCESS); @@ -55,7 +55,7 @@ static int run_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name
if (RegOpenKeyExW(root, path, 0, KEY_READ|KEY_SET_VALUE, &key)) { - output_message(STRING_CANNOT_FIND); + output_message(STRING_KEY_NONEXIST); return 1; }
diff --git a/programs/reg/export.c b/programs/reg/export.c index 79f055c691f..5d55eaad407 100644 --- a/programs/reg/export.c +++ b/programs/reg/export.c @@ -374,7 +374,7 @@ int reg_export(int argc, WCHAR *argvW[])
if (RegOpenKeyExW(root, path, 0, KEY_READ, &hkey)) { - output_message(STRING_INVALID_KEY); + output_message(STRING_KEY_NONEXIST); return 1; }
diff --git a/programs/reg/query.c b/programs/reg/query.c index 961d926a10b..a82101a0a29 100644 --- a/programs/reg/query.c +++ b/programs/reg/query.c @@ -302,7 +302,7 @@ static int run_query(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name,
if (RegOpenKeyExW(root, path, 0, KEY_READ, &key) != ERROR_SUCCESS) { - output_message(STRING_CANNOT_FIND); + output_message(STRING_KEY_NONEXIST); return 1; }
diff --git a/programs/reg/reg.rc b/programs/reg/reg.rc index 6077ace0ccb..10ad38942c3 100644 --- a/programs/reg/reg.rc +++ b/programs/reg/reg.rc @@ -170,4 +170,5 @@ STRINGTABLE
STRING_INVALID_SYSTEM_KEY, "reg: Invalid system key [%1]\n" STRING_OVERWRITE_FILE, "The file '%1' already exists. Do you want to overwrite it?" + STRING_KEY_NONEXIST, "reg: Unable to find the specified registry key\n" } diff --git a/programs/reg/resource.h b/programs/reg/resource.h index 518f92ceac3..f1a8016b57f 100644 --- a/programs/reg/resource.h +++ b/programs/reg/resource.h @@ -59,3 +59,4 @@ #define STRING_EXPORT_USAGE 136 #define STRING_INVALID_SYSTEM_KEY 137 #define STRING_OVERWRITE_FILE 138 +#define STRING_KEY_NONEXIST 139