Page 1 of 1

"msg" command runs from CmdPrompt but not from batch script

Posted: 23 Feb 2021 23:02
by pstein
When I enter the command

msg Peter /TIME:0 hello

on command line CmdPrompt then everything is ok.

A popup info box appears with the message "hello".

When I execute the same command from inside a DOS batch script then I got an error:

'msg' is not recognized as an internal or external command,
operable program or batch file.

Why?

Re: "msg" command runs from CmdPrompt but not from batch script

Posted: 24 Feb 2021 01:17
by Squashman
I cannot reproduce your problem.

Re: "msg" command runs from CmdPrompt but not from batch script

Posted: 24 Feb 2021 15:09
by dbenham
Perhaps your batch script is corrupting your PATH variable?

Re: "msg" command runs from CmdPrompt but not from batch script

Posted: 25 Feb 2021 03:57
by Eureka!
.. or your PATHEXT variable