Author: akhaldi Date: Sat Jun 4 17:48:30 2016 New Revision: 71515
URL: http://svn.reactos.org/svn/reactos?rev=71515&view=rev Log: [REG] Sync with Wine Staging 1.9.11. CORE-11368
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/bg-BG.rc trunk/reactos/base/applications/cmdutils/reg/lang/cs-CZ.rc trunk/reactos/base/applications/cmdutils/reg/lang/da-DK.rc trunk/reactos/base/applications/cmdutils/reg/lang/de-DE.rc trunk/reactos/base/applications/cmdutils/reg/lang/en-US.rc trunk/reactos/base/applications/cmdutils/reg/lang/es-ES.rc trunk/reactos/base/applications/cmdutils/reg/lang/fr-FR.rc trunk/reactos/base/applications/cmdutils/reg/lang/it-IT.rc trunk/reactos/base/applications/cmdutils/reg/lang/ja-JP.rc trunk/reactos/base/applications/cmdutils/reg/lang/ko-KR.rc trunk/reactos/base/applications/cmdutils/reg/lang/lt-LT.rc trunk/reactos/base/applications/cmdutils/reg/lang/nl-NL.rc trunk/reactos/base/applications/cmdutils/reg/lang/no-NO.rc trunk/reactos/base/applications/cmdutils/reg/lang/pl-PL.rc trunk/reactos/base/applications/cmdutils/reg/lang/pt-PT.rc trunk/reactos/base/applications/cmdutils/reg/lang/ro-RO.rc trunk/reactos/base/applications/cmdutils/reg/lang/ru-RU.rc trunk/reactos/base/applications/cmdutils/reg/lang/sl-SI.rc trunk/reactos/base/applications/cmdutils/reg/lang/sq-AL.rc trunk/reactos/base/applications/cmdutils/reg/lang/sv-SE.rc trunk/reactos/base/applications/cmdutils/reg/lang/tr-TR.rc trunk/reactos/base/applications/cmdutils/reg/lang/uk-UA.rc trunk/reactos/base/applications/cmdutils/reg/lang/zh-CN.rc trunk/reactos/base/applications/cmdutils/reg/lang/zh-TW.rc trunk/reactos/base/applications/cmdutils/reg/reg.c trunk/reactos/base/applications/cmdutils/reg/reg.h trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/bg-BG.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/bg-BG.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/bg-BG.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/cs-CZ.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/cs-CZ.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/cs-CZ.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -29,4 +29,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/da-DK.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/da-DK.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/da-DK.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/de-DE.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/de-DE.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/en-US.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/en-US.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/es-ES.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/es-ES.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/es-ES.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/fr-FR.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/fr-FR.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/it-IT.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/it-IT.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/it-IT.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/ja-JP.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/ja-JP.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/ja-JP.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/ko-KR.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/ko-KR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/ko-KR.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/lt-LT.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/lt-LT.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/lt-LT.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/nl-NL.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/nl-NL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/nl-NL.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/no-NO.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/no-NO.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/no-NO.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/pl-PL.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/pl-PL.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/pt-PT.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/pt-PT.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/pt-PT.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/ro-RO.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/ro-RO.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/ro-RO.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -30,4 +30,12 @@ STRING_DELETE_VALUE, "Sigur doriÈi Ètergerea valorii de registru «%1»?" STRING_DELETE_VALUEALL, "Sigur doriÈi Ètergerea tuturor valorilor de registru din «%1»?" STRING_DELETE_SUBKEY, "Sigur doriÈi Ètergerea cheii de registru «%1»?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/ru-RU.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/ru-RU.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/sl-SI.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/sl-SI.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/sl-SI.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/sq-AL.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/sq-AL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/sq-AL.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -28,4 +28,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/sv-SE.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/sv-SE.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/sv-SE.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/tr-TR.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/tr-TR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/tr-TR.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -26,4 +26,12 @@ STRING_DELETE_VALUE, """%1"" deÄer defteri deÄerini silmek istemekten emin misiniz?" STRING_DELETE_VALUEALL, "Tüm ""%1"" deÄer defteri deÄerlerini silmek istemekten emin misiniz?" STRING_DELETE_SUBKEY, """%1"" deÄer defteri dizinini silmek istemekten emin misiniz?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/uk-UA.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/uk-UA.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/uk-UA.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -24,4 +24,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/zh-CN.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/zh-CN.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/zh-CN.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -26,4 +26,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/lang/zh-TW.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/lang/zh-TW.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/lang/zh-TW.rc [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -26,4 +26,12 @@ STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?" STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?" STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?" + 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_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" + STRING_INVALID_SYNTAX, "reg: Invalid syntax. " + STRING_INVALID_OPTION, "reg: Invalid option [%1]. " + STRING_REG_HELP, "Type ""REG /?"" for help.\n" + STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n" }
Modified: trunk/reactos/base/applications/cmdutils/reg/reg.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/reg.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/reg.c [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -25,6 +25,7 @@ #include <shlwapi.h> #include <wine/unicode.h> #include <wine/debug.h> +#include <errno.h> #include "reg.h"
#define ARRAY_SIZE(A) (sizeof(A)/sizeof(*A)) @@ -156,6 +157,7 @@ WCHAR Nbuffer[4]; WCHAR defval[32]; WCHAR answer[MAX_PATH]; + WCHAR *str; DWORD count;
hmod = GetModuleHandleW(NULL); @@ -163,9 +165,11 @@ LoadStringW(hmod, STRING_NO, Nbuffer, ARRAY_SIZE(Nbuffer)); LoadStringW(hmod, STRING_DEFAULT_VALUE, defval, ARRAY_SIZE(defval));
+ str = (reg_info && *reg_info) ? reg_info : defval; + while (1) { - output_message(msgid, reg_info ? reg_info : defval); + output_message(msgid, str); output_message(STRING_YESNO); ReadConsoleW(GetStdHandle(STD_INPUT_HANDLE), answer, ARRAY_SIZE(answer), &count, NULL); answer[0] = toupperW(answer[0]); @@ -227,10 +231,13 @@ return -1; }
-static LPBYTE get_regdata(LPWSTR data, DWORD reg_type, WCHAR separator, DWORD *reg_count) -{ +static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DWORD *reg_count) +{ + static const WCHAR empty; LPBYTE out_data = NULL; *reg_count = 0; + + if (!data) data = ∅
switch (reg_type) { @@ -249,8 +256,8 @@ { LPWSTR rest; DWORD val; - val = strtoulW(data, &rest, (data[1] == 'x') ? 16 : 10); - if (*rest || data[0] == '-') { + val = strtoulW(data, &rest, (tolowerW(data[1]) == 'x') ? 16 : 10); + if (*rest || data[0] == '-' || (val == ~0u && errno == ERANGE)) { output_message(STRING_MISSING_INTEGER); break; } @@ -289,7 +296,35 @@ break; } case REG_MULTI_SZ: - /* FIXME: Needs handling */ + { + int i, destindex, len = strlenW(data); + WCHAR *buffer = HeapAlloc(GetProcessHeap(), 0, (len + 2) * sizeof(WCHAR)); + + for (i = 0, destindex = 0; i < len; i++, destindex++) + { + if (!separator && data[i] == '\' && data[i + 1] == '0') + { + buffer[destindex] = 0; + i++; + } + else if (data[i] == separator) + buffer[destindex] = 0; + else + buffer[destindex] = data[i]; + + if (destindex && !buffer[destindex - 1] && (!buffer[destindex] || destindex == 1)) + { + HeapFree(GetProcessHeap(), 0, buffer); + output_message(STRING_INVALID_STRING); + return NULL; + } + } + buffer[destindex] = 0; + if (destindex && buffer[destindex - 1]) + buffer[++destindex] = 0; + *reg_count = (destindex + 1) * sizeof(WCHAR); + return (BYTE *)buffer; + } default: output_message(STRING_UNHANDLED_TYPE, reg_type, data); } @@ -326,12 +361,7 @@ return 1;
p = strchrW(key_name,'\'); - if (!p) - { - output_message(STRING_INVALID_KEY); - return 1; - } - p++; + if (p) p++;
root = path_get_rootkey(key_name); if (!root) @@ -352,7 +382,7 @@ return 1; }
- if (value_name || data) + if (value_name || value_empty || data) { DWORD reg_type; DWORD reg_count = 0; @@ -378,14 +408,14 @@ output_message(STRING_UNSUPPORTED_TYPE, type); return 1; } - if (reg_type == REG_DWORD && !data) + if ((reg_type == REG_DWORD || reg_type == REG_DWORD_BIG_ENDIAN) && !data) { RegCloseKey(subkey); output_message(STRING_INVALID_CMDLINE); return 1; }
- if (data && !(reg_data = get_regdata(data, reg_type, separator, ®_count))) + if (!(reg_data = get_regdata(data, reg_type, separator, ®_count))) { RegCloseKey(subkey); return 1; @@ -411,12 +441,7 @@ return 1;
p = strchrW(key_name,'\'); - if (!p) - { - output_message(STRING_INVALID_KEY); - return 1; - } - p++; + if (p) p++;
root = path_get_rootkey(key_name); if (!root) @@ -478,8 +503,8 @@ &maxValue, NULL, NULL, NULL); if (rc != ERROR_SUCCESS) { - /* FIXME: failure */ RegCloseKey(subkey); + output_message(STRING_GENERAL_FAILURE); return 1; } maxValue++; @@ -493,42 +518,369 @@ { rc = RegDeleteValueW(subkey, szValue); if (rc != ERROR_SUCCESS) - break; + { + HeapFree(GetProcessHeap(), 0, szValue); + RegCloseKey(subkey); + output_message(STRING_VALUEALL_FAILED, key_name); + return 1; + } } else break; } - if (rc != ERROR_SUCCESS) - { - /* FIXME delete failed */ - } - } - else if (value_name) - { - if (RegDeleteValueW(subkey,value_name) != ERROR_SUCCESS) + } + else if (value_name || value_empty) + { + if (RegDeleteValueW(subkey, value_empty ? NULL : value_name) != ERROR_SUCCESS) { RegCloseKey(subkey); output_message(STRING_CANNOT_FIND); return 1; } } - else if (value_empty) - { - RegSetValueExW(subkey,NULL,0,REG_SZ,NULL,0); - }
RegCloseKey(subkey); output_message(STRING_SUCCESS); return 0; }
-static int reg_query(WCHAR *key_name, WCHAR *value_name, BOOL value_empty, - BOOL subkey) -{ - static const WCHAR stubW[] = {'S','T','U','B',' ','Q','U','E','R','Y',' ', - '-',' ','%','1',' ','%','2',' ','%','3','!','d','!',' ','%','4','!','d','!','\n',0}; - output_string(stubW, key_name, value_name, value_empty, subkey); - - return 1; +static WCHAR *reg_data_to_wchar(DWORD type, const BYTE *src, DWORD size_bytes) +{ + WCHAR *buffer = NULL; + int i; + + switch (type) + { + case REG_SZ: + case REG_EXPAND_SZ: + buffer = HeapAlloc(GetProcessHeap(), 0, size_bytes); + strcpyW(buffer, (WCHAR *)src); + break; + case REG_NONE: + case REG_BINARY: + { + WCHAR *ptr; + WCHAR fmt[] = {'%','0','2','X',0}; + + buffer = HeapAlloc(GetProcessHeap(), 0, (size_bytes * 2 + 1) * sizeof(WCHAR)); + ptr = buffer; + for (i = 0; i < size_bytes; i++) + ptr += sprintfW(ptr, fmt, src[i]); + break; + } + case REG_DWORD: + /* case REG_DWORD_LITTLE_ENDIAN: */ + case REG_DWORD_BIG_ENDIAN: + { + const int zero_x_dword = 10; + WCHAR fmt[] = {'0','x','%','x',0}; + + buffer = HeapAlloc(GetProcessHeap(), 0, (zero_x_dword + 1) * sizeof(WCHAR)); + sprintfW(buffer, fmt, *(DWORD *)src); + break; + } + case REG_MULTI_SZ: + { + const int two_wchars = 2 * sizeof(WCHAR); + DWORD tmp_size; + const WCHAR *tmp = (const WCHAR *)src; + int len, destindex; + + if (size_bytes <= two_wchars) + { + buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)); + *buffer = 0; + return buffer; + } + + tmp_size = size_bytes - two_wchars; /* exclude both null terminators */ + buffer = HeapAlloc(GetProcessHeap(), 0, tmp_size * 2 + sizeof(WCHAR)); + len = tmp_size / sizeof(WCHAR); + + for (i = 0, destindex = 0; i < len; i++, destindex++) + { + if (tmp[i]) + buffer[destindex] = tmp[i]; + else + { + buffer[destindex++] = '\'; + buffer[destindex] = '0'; + } + } + buffer[destindex] = 0; + break; + } + } + return buffer; +} + +static const WCHAR *reg_type_to_wchar(DWORD type) +{ + int i, array_size = ARRAY_SIZE(type_rels); + + for (i = 0; i < array_size; i++) + { + if (type == type_rels[i].type) + return type_rels[i].name; + } + return NULL; +} + +static void output_value(const WCHAR *value_name, DWORD type, BYTE *data, DWORD data_size) +{ + WCHAR fmt[] = {' ',' ',' ',' ','%','1',0}; + WCHAR *reg_data; + WCHAR newlineW[] = {'\n',0}; + + if (value_name && value_name[0]) + output_string(fmt, value_name); + else + { + WCHAR defval[32]; + LoadStringW(GetModuleHandleW(NULL), STRING_DEFAULT_VALUE, defval, ARRAY_SIZE(defval)); + output_string(fmt, defval); + } + output_string(fmt, reg_type_to_wchar(type)); + reg_data = reg_data_to_wchar(type, data, data_size); + output_string(fmt, reg_data); + HeapFree(GetProcessHeap(), 0, reg_data); + output_string(newlineW); +} + +static WCHAR *build_subkey_path(WCHAR *path, DWORD path_len, WCHAR *subkey_name, DWORD subkey_len) +{ + WCHAR *subkey_path; + WCHAR fmt[] = {'%','s','\','%','s',0}; + + subkey_path = HeapAlloc(GetProcessHeap(), 0, (path_len + subkey_len + 2) * sizeof(WCHAR)); + if (!subkey_path) + { + ERR("Failed to allocate memory for subkey_path\n"); + return NULL; + } + sprintfW(subkey_path, fmt, path, subkey_name); + return subkey_path; +} + +static unsigned int num_values_found = 0; + +static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse) +{ + LONG rc; + DWORD num_subkeys, max_subkey_len, subkey_len; + DWORD max_data_bytes, data_size; + DWORD type, path_len, i; + BYTE *data; + WCHAR fmt[] = {'%','1','\n',0}; + WCHAR newlineW[] = {'\n',0}; + WCHAR *subkey_name, *subkey_path; + HKEY subkey; + + rc = RegQueryInfoKeyW(key, NULL, NULL, NULL, &num_subkeys, &max_subkey_len, + NULL, NULL, NULL, &max_data_bytes, NULL, NULL); + if (rc) + { + ERR("RegQueryInfoKey failed: %d\n", rc); + return 1; + } + + data = HeapAlloc(GetProcessHeap(), 0, max_data_bytes); + if (!data) + { + ERR("Failed to allocate memory for data\n"); + return 1; + } + + data_size = max_data_bytes; + rc = RegQueryValueExW(key, value_name, NULL, &type, data, &data_size); + if (rc == ERROR_SUCCESS) + { + output_string(fmt, path); + output_value(value_name, type, data, data_size); + output_string(newlineW); + num_values_found++; + } + + HeapFree(GetProcessHeap(), 0, data); + + if (!recurse) + { + if (rc == ERROR_FILE_NOT_FOUND) + { + output_message(STRING_CANNOT_FIND); + return 1; + } + return 0; + } + + max_subkey_len++; + subkey_name = HeapAlloc(GetProcessHeap(), 0, max_subkey_len * sizeof(WCHAR)); + if (!subkey_name) + { + ERR("Failed to allocate memory for subkey_name\n"); + return 1; + } + + path_len = strlenW(path); + + for (i = 0; i < num_subkeys; i++) + { + subkey_len = max_subkey_len; + rc = RegEnumKeyExW(key, i, subkey_name, &subkey_len, NULL, NULL, NULL, NULL); + if (rc == ERROR_SUCCESS) + { + subkey_path = build_subkey_path(path, path_len, subkey_name, subkey_len); + if (!RegOpenKeyExW(key, subkey_name, 0, KEY_READ, &subkey)) + { + query_value(subkey, value_name, subkey_path, recurse); + RegCloseKey(subkey); + } + HeapFree(GetProcessHeap(), 0, subkey_path); + } + } + + HeapFree(GetProcessHeap(), 0, subkey_name); + return 0; +} + +static int query_all(HKEY key, WCHAR *path, BOOL recurse) +{ + LONG rc; + DWORD num_subkeys, max_subkey_len, subkey_len; + DWORD num_values, max_value_len, value_len; + DWORD max_data_bytes, data_size; + DWORD i, type, path_len; + WCHAR fmt[] = {'%','1','\n',0}; + WCHAR fmt_path[] = {'%','1','\','%','2','\n',0}; + WCHAR *value_name, *subkey_name, *subkey_path; + WCHAR newlineW[] = {'\n',0}; + BYTE *data; + HKEY subkey; + + rc = RegQueryInfoKeyW(key, NULL, NULL, NULL, &num_subkeys, &max_subkey_len, NULL, + &num_values, &max_value_len, &max_data_bytes, NULL, NULL); + if (rc) + { + ERR("RegQueryInfoKey failed: %d\n", rc); + return 1; + } + + output_string(fmt, path); + + max_value_len++; + value_name = HeapAlloc(GetProcessHeap(), 0, max_value_len * sizeof(WCHAR)); + if (!value_name) + { + ERR("Failed to allocate memory for value_name\n"); + return 1; + } + + data = HeapAlloc(GetProcessHeap(), 0, max_data_bytes); + if (!data) + { + HeapFree(GetProcessHeap(), 0, value_name); + ERR("Failed to allocate memory for data\n"); + return 1; + } + + for (i = 0; i < num_values; i++) + { + value_len = max_value_len; + data_size = max_data_bytes; + rc = RegEnumValueW(key, i, value_name, &value_len, NULL, &type, data, &data_size); + if (rc == ERROR_SUCCESS) + output_value(value_name, type, data, data_size); + } + + HeapFree(GetProcessHeap(), 0, data); + HeapFree(GetProcessHeap(), 0, value_name); + + if (num_values || recurse) + output_string(newlineW); + + max_subkey_len++; + subkey_name = HeapAlloc(GetProcessHeap(), 0, max_subkey_len * sizeof(WCHAR)); + if (!subkey_name) + { + ERR("Failed to allocate memory for subkey_name\n"); + return 1; + } + + path_len = strlenW(path); + + for (i = 0; i < num_subkeys; i++) + { + subkey_len = max_subkey_len; + rc = RegEnumKeyExW(key, i, subkey_name, &subkey_len, NULL, NULL, NULL, NULL); + if (rc == ERROR_SUCCESS) + { + if (recurse) + { + subkey_path = build_subkey_path(path, path_len, subkey_name, subkey_len); + if (!RegOpenKeyExW(key, subkey_name, 0, KEY_READ, &subkey)) + { + query_all(subkey, subkey_path, recurse); + RegCloseKey(subkey); + } + HeapFree(GetProcessHeap(), 0, subkey_path); + } + else output_string(fmt_path, path, subkey_name); + } + } + + HeapFree(GetProcessHeap(), 0, subkey_name); + + if (num_subkeys && !recurse) + output_string(newlineW); + + return 0; +} + +static int reg_query(WCHAR *key_name, WCHAR *value_name, BOOL value_empty, BOOL recurse) +{ + WCHAR *p; + HKEY root, key; + WCHAR newlineW[] = {'\n',0}; + int ret; + + if (!sane_path(key_name)) + return 1; + + if (value_name && value_empty) + { + output_message(STRING_INVALID_CMDLINE); + return 1; + } + + root = path_get_rootkey(key_name); + if (!root) + { + output_message(STRING_INVALID_KEY); + return 1; + } + + p = strchrW(key_name, '\'); + if (p) p++; + + if (RegOpenKeyExW(root, p, 0, KEY_READ, &key) != ERROR_SUCCESS) + { + output_message(STRING_CANNOT_FIND); + return 1; + } + + output_string(newlineW); + + if (value_name || value_empty) + { + ret = query_value(key, value_name, key_name, recurse); + if (recurse) + output_message(STRING_MATCHES_FOUND, num_values_found); + } + else + ret = query_all(key, key_name, recurse); + + RegCloseKey(key); + + return ret; }
int wmain(int argc, WCHAR *argvW[]) @@ -548,8 +900,14 @@ static const WCHAR slashVEW[] = {'/','v','e',0}; static const WCHAR slashHelpW[] = {'/','?',0};
- if (argc < 2 || !lstrcmpW(argvW[1], slashHelpW) - || !lstrcmpiW(argvW[1], slashHW)) + if (argc == 1) + { + output_message(STRING_INVALID_SYNTAX); + output_message(STRING_REG_HELP); + return 1; + } + + if (!lstrcmpW(argvW[1], slashHelpW) || !lstrcmpiW(argvW[1], slashHW)) { output_message(STRING_USAGE); return 0; @@ -562,7 +920,8 @@
if (argc < 3) { - output_message(STRING_INVALID_CMDLINE); + output_message(STRING_INVALID_SYNTAX); + output_message(STRING_FUNC_HELP, struprW(argvW[1])); return 1; } else if (argc == 3 && (!lstrcmpW(argvW[2], slashHelpW) || @@ -576,7 +935,13 @@ for (i = 1; i < argc; i++) { if (!lstrcmpiW(argvW[i], slashVW)) - value_name = argvW[++i]; + { + if (value_name || !(value_name = argvW[++i])) + { + output_message(STRING_INVALID_CMDLINE); + return 1; + } + } else if (!lstrcmpiW(argvW[i], slashVEW)) value_empty = TRUE; else if (!lstrcmpiW(argvW[i], slashTW)) @@ -613,7 +978,8 @@
if (argc < 3) { - output_message(STRING_INVALID_CMDLINE); + output_message(STRING_INVALID_SYNTAX); + output_message(STRING_FUNC_HELP, struprW(argvW[1])); return 1; } else if (argc == 3 && (!lstrcmpW(argvW[2], slashHelpW) || @@ -627,7 +993,13 @@ for (i = 1; i < argc; i++) { if (!lstrcmpiW(argvW[i], slashVW)) - value_name = argvW[++i]; + { + if (value_name || !(value_name = argvW[++i])) + { + output_message(STRING_INVALID_CMDLINE); + return 1; + } + } else if (!lstrcmpiW(argvW[i], slashVEW)) value_empty = TRUE; else if (!lstrcmpiW(argvW[i], slashVAW)) @@ -640,11 +1012,12 @@ else if (!lstrcmpiW(argvW[1], queryW)) { WCHAR *key_name, *value_name = NULL; - BOOL value_empty = FALSE, subkey = FALSE; + BOOL value_empty = FALSE, recurse = FALSE;
if (argc < 3) { - output_message(STRING_INVALID_CMDLINE); + output_message(STRING_INVALID_SYNTAX); + output_message(STRING_FUNC_HELP, struprW(argvW[1])); return 1; } else if (argc == 3 && (!lstrcmpW(argvW[2], slashHelpW) || @@ -658,17 +1031,24 @@ for (i = 1; i < argc; i++) { if (!lstrcmpiW(argvW[i], slashVW)) - value_name = argvW[++i]; + { + if (value_name || !(value_name = argvW[++i])) + { + output_message(STRING_INVALID_CMDLINE); + return 1; + } + } else if (!lstrcmpiW(argvW[i], slashVEW)) value_empty = TRUE; else if (!lstrcmpiW(argvW[i], slashSW)) - subkey = TRUE; - } - return reg_query(key_name, value_name, value_empty, subkey); + recurse = TRUE; + } + return reg_query(key_name, value_name, value_empty, recurse); } else { - output_message(STRING_INVALID_CMDLINE); - return 1; - } -} + output_message(STRING_INVALID_OPTION, argvW[1]); + output_message(STRING_REG_HELP); + return 1; + } +}
Modified: trunk/reactos/base/applications/cmdutils/reg/reg.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils/... ============================================================================== --- trunk/reactos/base/applications/cmdutils/reg/reg.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/reg/reg.h [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -45,3 +45,11 @@ #define STRING_DELETE_VALUE 120 #define STRING_DELETE_VALUEALL 121 #define STRING_DELETE_SUBKEY 122 +#define STRING_INVALID_STRING 123 +#define STRING_VALUEALL_FAILED 124 +#define STRING_GENERAL_FAILURE 125 +#define STRING_MATCHES_FOUND 126 +#define STRING_INVALID_SYNTAX 127 +#define STRING_INVALID_OPTION 128 +#define STRING_REG_HELP 129 +#define STRING_FUNC_HELP 130
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=7... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Jun 4 17:48:30 2016 @@ -229,7 +229,7 @@ ReactOS shares the following programs with Winehq.
reactos/base/applications/cmdutils/cscript # Synced to WineStaging-1.9.4 -reactos/base/applications/cmdutils/reg # Synced to WineStaging-1.9.4 +reactos/base/applications/cmdutils/reg # Synced to WineStaging-1.9.11 reactos/base/applications/cmdutils/taskkill # Synced to WineStaging-1.9.4 reactos/base/applications/cmdutils/wmic # Synced to WineStaging-1.9.4 reactos/base/applications/cmdutils/wscript # Synced to WineStaging-1.9.4