The command: "reg DELETE /?" is on Windows 12, 11, 10, .. , MS Server 2025, 2022, 2019, .. available
The examples for the command "reg DELETE /?"
Here are detailed technical descriptions for examples of the
`REG DELETE` command:
Example 1: Deleting a value:
REG DELETE "HKCU\Software\Example" /v ValueName /f
-
`REG DELETE`: This command is used to delete a value from the registry.
-
`"HKCU\Software\Example"`: The path where the value to be deleted is located.
-
`/v ValueName`: The name of the value to delete.
-
`/f`: Force execution without user confirmation.
Example 2: Deleting an entire subkey:
REG DELETE "HKLM\Software\Example" /f
- Here the entire subkey
"HKLM\Software\Example" and all its values ??and subkeys are deleted.
Example 3: Deleting a subkey with quotes in the name:
REG DELETE "HKCU\Software\Example with spaces" /f
- This command deletes the entire subkey
"HKCU\Software\Example with spaces".
Example 4: Deleting a value with quotes in the name:
REG DELETE "HKLM\Software\Example" /v "Value with spaces" /f
- Here the value named
"Value with space" is deleted from the registry branch
"HKLM\Software\Example".
Example 5: Deleting a value using the registry hive (REG_SZ):
REG DELETE "HKLM\Software\Example" /v ValueName /ve /f
-
`/ve`: This parameter allows clearing the default value (default value for the key). This example deletes the value named
"ValueName".
Special care should be taken when using the
`REG DELETE` command as deleting registry entries can have irreversible effects on the system. It is strongly recommended that you create prior backups and ensure that you fully understand the impact of deleting entries. The
`/f` parameter should be used carefully as it forces deletion without confirmation.
"reg DELETE /?" Excerpt from Microsoft Windows Help
Microsoft Windows [Version 10.0.19045.3693]
(c) Copyright 1985-2023 Microsoft Corp.
C:\\WINDOWS>
Console Registry Tool for Windows - version 3.0
Copyright (C) Microsoft Corp. 1981-2001. All rights reserved
REG DELETE KeyName [/v ValueName | /ve | /va] [/f]
KeyName [\\Machine\]FullKey
Machine Name of remote machine - omitting defaults to the current machine
Only HKLM and HKU are available on remote machines
FullKey ROOTKEY\SubKey
ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]
SubKey The full name of a registry key under the selected ROOTKEY
ValueName The value name, under the selected Key, to delete
When omitted, all subkeys and values under the Key are deleted
/ve delete the value of empty value name <no name>
/va delete all values under this key
/f Forces the deletion without propmt
Examples:
REG DELETE HKLM\Software\MyCo\MyApp\Timeout
Deletes the registry key Timeout and its all subkeys and values
REG DELETE \\ZODIAC\HKLM\Software\MyCo /v MTU
Deletes the registry value MTU under MyCo on ZODIAC
Important information, tips for the "reg DELETE /?" command
Yes, there are some important points to note when using the
`REG DELETE` command in the Windows Registry:
1: Administrator rights:
- Many
`REG DELETE` operations require administrator privileges. Make sure you run Command Prompt as administrator.
Example:
REG DELETE "HKCU\Software\Example" /v ValueName /f
2: Create backup:
- Before deleting values ??or subkeys, create a backup of the relevant registry entries or the entire registry tree.
Example:
REG EXPORT "HKCU\Software\Example" C:\Backup\ExampleBackup.reg
3: Exact path:
- Make sure the path provided is accurate and correct. Errors in the path can lead to unexpected results.
Example:
REG DELETE "HKLM\Software\Example" /f
4: Confirmation with /f:
- The
`/f` parameter forces execution without user confirmation. Be sure you understand the implications of deleting it before using it.
Example:
REG DELETE "HKCU\Software\Example" /v ValueName /f
5: Quotation marks for paths with spaces:
- If the path contains spaces, enclose the entire path in quotation marks.
Example:
REG DELETE "HKLM\Software\Example with spaces" /f
6: Delete an entire subkey:
- Deleting an entire subkey with
`/f` will delete all values ??and subkeys under that key.
Example:
REG DELETE "HKLM\Software\Example" /f
7: Clear default value:
- Use
`/ve` if you want to clear the default value of a key.
Example:
REG DELETE "HKLM\Software\Example" /ve /f
8: Consider safety aspects:
- Do not delete registry entries if you are unsure of the impact. Improper deletion can cause malfunctions.
Note that the registry contains important system information and deleting entries can cause serious problems. Previous backups are crucial and you should be careful to avoid unintentional changes.