I cannot use the msg command in cmd (or the package, for that matter). How can i fix this?

While in cmd or creating a batch file I can not use the command msg. When I try to use it, it returns an error msg is not recognized as an internal or external command, operable program or batch file. "I'm sure the error is that I lost msg.exein system32, so can someone show how to get this? I am running Windows 8.1.

+5
source share
2 answers

msg.exe Not available on all Windows platforms in all environments.

%SystemRoot%\System32\msg.exe (64- %SystemRoot%\SysWOW64\msg.exe), %SystemRoot%\SysWOW64\msg.exe (32- ) Windows 7 x64 Enterprise, - 64- msg.exe 32- , %SystemRoot%\Sysnative\msg.exe.

System32, SysWOW64 Sysnative . Microsoft Sysnative

?

  1. 32- Windows %SystemRoot%\System32\msg.exe.

  2. , 64- Windows 64- cmd.exe %SystemRoot%\System32\msg.exe.

  3. , 64- Windows 32- cmd.exe %SystemRoot%\Sysnative\msg.exe.

, cmd.exe , cmd.exe , 32- 64- 64- Windows,

%SystemRoot%\Sysnative\cmd.exe 32- Windows x64 %SystemRoot%\Sysnative\msg.exe Windows x64 Windows x86 %SystemRoot%\System32\cmd.exe %SystemRoot%\System32\msg.exe.

- 64- :

MsgDemo.bat:

@echo off
%SystemRoot%\System32\msg.exe /?
pause

32- , Windows x64, :

%SystemRoot%\Sysnative\cmd.exe /C MsgDemo.bat

- msg.exe:

@echo off
set "AppMsg=%SystemRoot%\System32\msg.exe"
if not "%ProgramFiles(x86)%" == "" (

    rem Explicitly reference 64-bit version on Windows x64 as there is
    rem no 32-bit version. But use Sysnative redirector only if the batch
    rem file was started with 32-bit cmd.exe as otherwise System32 contains
    rem msg.exe if it is not missing at all like on Windows 7 Home Premium.

    if exist %SystemRoot%\Sysnative\* set "AppMsg=%SystemRoot%\Sysnative\msg.exe"
)
%AppMsg% /?
set "AppMsg="
pause

%SystemRoot%\Sysnative 64- , 32- .

%SystemRoot%\Sysnative . , if exist %SystemRoot%\Sysnative , if exist %SystemRoot%\Sysnative\*.

+4

msg.exe Windows 7 system32 system32.

0

All Articles