You are probably running into a path / 32/64bit issue.

Try this.

 Code:
$RC=setoption("Wow64FileRedirection","OFF")
shell "%comspec% /c msg.exe * This is a test message."