Registry.DeleteKey
------------------

Deletes a key in the registry.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Registry](component_Registry.md) | [7.2](newinversion72.md) | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |

MBS( "Registry.DeleteKey"; Path; Name ) 

**MBS**( **"Registry.DeleteKey";** /\* Deletes a key in the registry. \*/  
**$Path**; /\* The path to the parent registry key.  
Separated by \\ you specify the path to the key you want.  
Root can be Classes, CurrentUser, LocalMachine, Users, PerformanceData, CurrentConfig, DynData or the HKEY names.e.g. "Users\\test" \*/   
**$Name**) /\* The name of the key to delete.e.g. "test" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | The path to the parent registry key.   Separated by \\ you specify the path to the key you want.   Root can be Classes, CurrentUser, LocalMachine, Users, PerformanceData, CurrentConfig, DynData or the HKEY names. | "Users\\test" |
| Name | The name of the key to delete. | "test" |

### Result

Returns OK or error.

### Description

Deletes a key in the registry.  
### Examples

Delete test key:

 MBS ( "Registry.DeleteKey"; "CurrentUser"; "Test")  
Delete a key in a path:

 MBS ( "Registry.DeleteKey"; "CurrentUser\\Test\\MyApp"; "MyPref")  
### See also

- [Registry.CreateKey](RegistryCreateKey.md)
- [Registry.DeleteTree](RegistryDeleteTree.md)
- [Registry.DeleteValue](RegistryDeleteValue.md)
- [Registry.FlushKey](RegistryFlushKey.md)

This function checks for a license.

Created 20th March 2017 , last changed 20th March 2017

  
[Registry.CreateKey](RegistryCreateKey.md) - [Registry.DeleteTree](RegistryDeleteTree.md)

[HTML Version](RegistryDeleteKey.shtml)