Windows: support for testing commands, plus a fix around windows registry key