Be careful phrasing reg.exe commands.
Sometimes it gives you the error ERROR: Invalid key name.
The reason is that the reg.exe is really sensitive on the order of the command-line: the first argument must be a full key, optionally prepended by a computername.
Any other optional command-line option (like /f to force execution without asking) needs to go after that.
See:
- [WayBack] windows registry – Invalid key name for REG ADD on some PCs – Super User
- [WayBack] Delete Registry key from command line
–jeroen





