If batch files or commands don't behave as expected then standard external commands could have been overriden by non-standard files with the same base name within the PATH environment. The following script tests all EXE and COM files within %__APPDIR__% (usually C:\Windows\system32).