Commit Graph

68 Commits

Author SHA1 Message Date
Hugh McMaster 2bd12424c9 reg: Output a list of subkeys when querying a registry key.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 21:04:37 +09:00
Hugh McMaster 3035599ad8 reg: Output value names when querying a registry key.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 21:04:37 +09:00
Hugh McMaster 3f62729b6e reg: Add initial 'query' support.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 21:04:36 +09:00
Hugh McMaster dad56c7dc6 reg: Exit with an error message if RegQueryInfoKeyW fails.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-07 00:59:56 +09:00
Hugh McMaster 31f0d95283 reg: Clean-up and inform the user if RegDeleteValueW fails when deleting all values in a registry key.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-05 00:06:41 +09:00
Hugh McMaster ead76c7e47 reg: Allow values to be added, deleted or modified in root keys.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 00:36:28 +09:00
Hugh McMaster bd278b1983 reg: Fail if multiple /v switches are passed in.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-15 21:44:33 +09:00
Hugh McMaster 735dca6074 reg: Fail if /v is passed without an argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-15 21:42:50 +09:00
Hugh McMaster 84eed4cf22 reg: Correctly handle cases with no data argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-15 19:15:42 +09:00
Hugh McMaster 3762c294d9 reg: Fail if REG_DWORD_BIG_ENDIAN is passed with no data argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-04 18:42:10 +09:00
Hugh McMaster 9bfddcf76f reg: Correctly handle /ve commands with no data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-04 18:42:09 +09:00
Hugh McMaster 8220a32e0a reg: Display the default value name when ask_confirm() is passed "" for reg_info.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-02 23:31:47 +09:00
Hugh McMaster 81a030b934 reg: Delete the default registry value instead of overwriting it.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-02 23:31:44 +09:00
Hugh McMaster a573f237d0 reg: Fail if the data for REG_MULTI_SZ begins with a separator.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 17:45:01 +09:00
Hugh McMaster afa5251b10 reg: Fail if the data for REG_MULTI_SZ contains two adjacent separators.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 17:44:59 +09:00
Hugh McMaster b57b998354 reg: Ignore the slash zero character sequence if a custom separator is specified.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-25 21:59:42 +09:00
Hugh McMaster 47b2238b3d reg: Add support for REG_MULTI_SZ.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-25 00:25:01 +09:00
Hugh McMaster 3c7b7ece37 reg: Fail if the data value passed with REG_DWORD will cause an overflow.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-23 20:22:21 +09:00
Hugh McMaster 5e6429520b reg: Allow either lowercase or uppercase 'x' when used with REG_DWORD.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-23 20:22:21 +09:00
Hugh McMaster 8a902f3761 reg: Fail if the separator for REG_MULTI_SZ is not one character in length.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-18 00:22:05 +09:00
Hugh McMaster 46bdc153f1 reg: Fail if /s is used without an accompanying argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-18 00:22:04 +09:00
Hugh McMaster acb4e3f63a reg: Explicitly use base 10 or base 16 with strtoulW.
All Windows versions, except XP, parse the number 0123 as decimal.
(XP parses 0123 as octal).

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 23:26:29 +09:00
Hugh McMaster 474361ecb4 reg: Fail if the data argument for REG_DWORD begins with a minus sign.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 23:26:29 +09:00
Hugh McMaster 948888b950 reg: Use strtoulW during conversion so we can set any value in the DWORD range.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 23:26:29 +09:00
Hugh McMaster 2fd010110a reg: Fail if strtolW cannot convert the entire data string into a DWORD.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 23:26:28 +09:00
Hugh McMaster aa9d2a7c17 reg: Abort the process if get_regdata returns NULL.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:32:26 +09:00
Hugh McMaster 07c6b1392f reg: Add case for REG_MULTI_SZ.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:32:01 +09:00
Hugh McMaster b14e1ba801 reg: Handle data for REG_DWORD_LITTLE_ENDIAN and REG_DWORD_BIG_ENDIAN.
REG_DWORD_LITTLE_ENDIAN is #define'd as REG_DWORD, so the LITTLE_ENDIAN
case is just a comment added for clarity.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:31:20 +09:00
Hugh McMaster 03afd26eb1 reg: Handle data for REG_EXPAND_SZ.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:31:09 +09:00
Hugh McMaster f1d45b5f44 reg: Handle data from REG_NONE.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:31:03 +09:00
Hugh McMaster 5061899c46 reg: Fail if REG_DWORD is passed with no data argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:30:19 +09:00
Hugh McMaster e0492b27ac reg: Call RegCloseKey before exiting if the user chooses to cancel the overwriting operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:30:17 +09:00
Hugh McMaster 3c340fda68 reg: Fail when /d is used without an accompanying argument.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 22:13:28 +09:00
Hugh McMaster 20a41d0339 reg: Ask the user if they want to delete the subkey, value, default value or all values.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 01:26:44 +09:00
Hugh McMaster a365418ae2 reg: Add support for the default registry value in ask_confirm().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 01:26:43 +09:00
Hugh McMaster c0b26a649e reg: Do not allow /v and /ve to be used together in the 'add' function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 01:26:43 +09:00
Hugh McMaster c59e3eae3b reg: Do not allow combinations of /v, /ve or /va in the 'delete' function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 01:26:43 +09:00
Hugh McMaster ae48fbafa8 reg: Ask the user whether they want to overwrite an existing registry value.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 21:51:10 +09:00
Hugh McMaster 5654b91f7c reg: Specify the data type that is unsupported.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 21:45:05 +09:00
Hugh McMaster 5f07f81ad1 reg: Output messages with a variable number of arguments and convert message arrays to strings.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 21:41:12 +09:00
Hugh McMaster dfe1c2b57c reg: Use FormatMessage for easier internationalization support.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 21:39:20 +09:00
Hugh McMaster bfcee1f149 reg: Split reg_printfW into separate functions.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 21:39:16 +09:00
Hugh McMaster dcd05e8e86 reg: Remove stub output from the 'add' and 'delete' functions.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-08 20:05:24 +09:00
Jonathan Vollebregt 60f599f584 reg: Simplify root key search.
Signed-off-by: Michel Zou <xantares09@hotmail.com>
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
2015-10-07 21:28:54 +09:00
Thomas Faller 5c9526cb6c reg: Implement binary data add operation. 2015-09-07 15:04:49 +09:00
Jonathan Vollebregt 0898bd22bf reg: Add wchar/type conversion functions. 2015-02-23 22:07:07 +09:00
Jonathan Vollebregt 513505d6c4 reg: Add a check for multiple backslashes at the end of the key. 2015-02-23 22:05:55 +09:00
Jonathan Vollebregt 208ca071dc reg: Add sane_path function to do preliminary key validation. 2015-02-23 22:03:34 +09:00
Sebastian Lackner f6b552324e reg.exe: Fix incorrect usage of CompareString in get_rootkey. 2014-11-19 23:36:34 +09:00
Jonathan Vollebregt b823337f65 reg.exe: Fix stack overflow on large registry keys. 2014-09-02 20:54:46 +02:00