While in cmd or making a batch file, I cannot use the command
msg. When I try to use it, it returns the error
msg is not recognized as an internal or external command, operable program or batch file." I'm pretty sure the error is that im missing a
msg.exe in system32, so could someone show how to obtain that? I'm running windows 8.1.
Best How To :
msg.exe is not available on all Windows platforms in all environments.
There is just
%SystemRoot%\Sysnative\msg.exe (64-bit), but no
%SystemRoot%\SysWOW64\msg.exe (32-bit) on Windows 7 x64 Enterprise.
Either the batch file is called with using explicitly
%SystemRoot%\Sysnative\cmd.exe or inside the batch file
%SystemRoot%\Sysnative\msg.exe is used on a Windows x64 machine while on a Windows x86 machine
%SystemRoot%\System32\msg.exe must be used.
Demo example for first variant with using 64-bit command line interpreter:
Batch file with name
is called with:
%SystemRoot%\Sysnative\cmd.exe /C MsgDemo.bat
Demo example for second variant with referencing
rem Explicitly reference 64-bit version on Windows x64 as there is no 32-bit version.
if not "%ProgramFiles(x86)%" == "" set "AppMsg=%SystemRoot%\Sysnative\msg.exe"