Hello!
Are you sure you are running the CMD as an administrator? Have you tried PowerShell too?
To reproduce this issue, could you tell us the exact OS version you have? I was unable to reproduce it on Windows 8.
Remember that we have another method to register agents:
Enrollment via agent configuration. The agent can request a new key on its own if you configure the manager's address in
ossec.conf and restart the agent.
Regards.