I want to add an expanded registry entry to `HKCR\Drive\shell\Cmder\command` with a value named `(Default)`.

If I use the Registry Editor it automatically adds a string value type `REG_SZ` with the name `Default` to it. The type of the value cannot be changed or the value cannot be deleted (in order to be to be replaced with a new value) afterwards.

If I use `reg add` in command line or a `.reg` file it says that operation completed successfully or that the keys and values have been successfully added but the registry changes are not really made.

To make sure there are no syntax errors, this is an example from [docs.microsoft.com](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/reg-add) that should add an expanded registry entry to `HKLM\Software\MyCo` with a value named `Path`, the type `REG_EXPAND_SZ`, and data of `%systemroot%`:

```
reg add HKLM\Software\MyCo /v Path /t REG_EXPAND_SZ /d ^%systemroot^%

```

It completes successfully but again the changes in the registry are not made. The `MyCo` key is not there.

Am I possibly doing something wrong with the `reg add` command? Are there any other ways to add `REG_EXPAND_SZ` type entries with the name `(Default)` to the registry?

**UPDATE:**

The Microsoft example actually works, but in order to see the changes you need to open a new instance of the Registry Editor (the already running one won't get updated for some reason)