11

I'm an old-timer experienced Windows user from way back. My main computer is a Windows 7 Pro box. We bought a new PC for a new office; it of course has Windows 10 (Home) on it. I was doing some work on the new PC and wanted to send the result of what I was doing -- the IPv6 address of a printer -- back to the Win 7 PC. I wanted to use NET SEND but that isn't available on Win 10 (or Win 7 as it turns out).

Research found that the MSG command is supposed to (sort of) do what NET SEND did in the old days. A web site sample showed a command prompt window with the current directory being C:\WINDOWS\SYSTEM32 and showed the result of MSG /? giving the syntax of the command -- just what I wanted.

But running MSG /? on the Win 10 box said that MSG was not recognized as a command. (It works on Win 7, with MSG.EXE being in SYSTEM32.) A bit of digging found MSG.EXE in a directory under WinSxS --

C:\Windows\WinSxS\amd64_microsoft-windows-t..commandlinetoolsmqq_31bf3856ad364e35_10.0.17134.1_none_0ea9fdb9152f846c

but it doesn't run right even with that set as the current directory. Something needs to install it, it seems -- tho there was nothing about doing anything like that in the online sample that I had found.

I checked "Programs" (what used to be "Programs and Features") and did not see it as something I could install.

What's going on? How do I make this usable? What other commads need to have the same kind of magic done so that they work from a normal command prompt?

Thanks for any assistance.

3
  • 2
    Um, forgive me for asking the obvious dumb question, but why couldn't you use Notepad and a thumbdrive to get the info to the other machine? Or any other method to get an IP address, even a IPv6 address, to another machine? Dec 1, 2018 at 1:05
  • Does this answer your question? How to Display a Msgbox directly from CMD
    – Ramhound
    Nov 23, 2020 at 10:23
  • WinSxs is the "good and updated image" Windows uses to repair itself, and a few other things. Don't mess with it. Don't run things from it. Nov 25, 2020 at 2:11

5 Answers 5

14

You are apparently using on all computers the Home version. This version does not include the MSG command. The command is only available in Windows versions starting from Pro.

As a side-remark, tested on Windows Enterprise, even the old "net send" command still exists in that version.

By all reports, trying to transplant msg.exe from higher Windows versions to Home does not work, so there is no easy workaround.

You can however write your own.

By using the free psexec you can execute code on remote computers that creates a pop-up message.

See the post Show a popup/message box from a Windows batch file for a few ideas.

The niftiest ones I found were:

  • mshta.exe, the runtime engine for Windows .hta HTML applications, accepts a general URL as command line argument, including a javascript: protocol URL. So you could issue an alert with a timeout of 10 seconds this way:

    mshta "javascript:var sh=new ActiveXObject( 'WScript.Shell' ); sh.Popup( 'Message!', 10, 'Title!', 64 );close()"
    
  • Using a VBScript file and call it using CScript, with something like the following in a .vbs file:

    Set objArgs = WScript.Arguments
    messageText = objArgs(0)
    MsgBox messageText
    
3

The MSG program is only available on Pro or Enterprise versions of Windows.
It's main intend is to notify users on a terminal server or similar stuff. It requires certain rights normally only available to administrators (normal user can be given the right to use it) meaning its main intend is to be used by windows Administrators to notify users about an shutdown, problem, etc.

The subfolder inside of WinSxS is from an Windows Update. Microsoft calls this folder "Component Store" and more info about it can be found in this article:
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/manage-the-component-store
I was able to find the same folder with msg.exe on my system. Looking at it, it doesn't seem like its an valid .exe file at all, its starts with "DCS" when looking at it in an hex editor but should start with "MZ" if its an executable file. I was not able to find any documentation about this "DCS" header.

Alternatives would be simply sending an mail and opening it in your web mail client if both computers have internet access. Windows 7 and 10 also both come with an feature to offer assistance to other people, it can be opened by starting msra.exe If that method does not work you could use other remote management tools like Teamviewer. Teamviewer has an option to use LAN only connections meaning no internet is required to use it on a local LAN.

2

Running MSG /? on the Win 10 box said that MSG was not recognized as a command

We bought a new PC for a new office; it of course has Windows 10 (Home) on it.

Home editions of Windows do not include msg

Source Msg - Windows CMD - SS64.com

What other commands need to have the same kind of magic done so that they work from a normal command prompt?

That question is "too broad".

3
  • SS64 is AWESOME Dec 1, 2018 at 1:06
  • 7
    That question is "too broad". This isn't a solution to the OP's problem. Some guidance (maybe a link to a relevant article) would be way less blunt. Dec 1, 2018 at 6:11
  • @Don'tRoothereplz... I was specifically referring to the quoted part of the question referring to "what other commands" - that part is indeed too broad as we don't know what commands he is referring to. In addition he asked "What's going on? How do I make this usable?" which is answered. He did not ask for solutions.
    – DavidPostill
    Dec 1, 2018 at 20:15
1

As detailed here and here, you need both msg.exe (to go in C:\Windows\System32)

  • C:\Windows\WinSxS\amd64_microsoft-windows-t..commandlinetoolsmqq_31bf3856ad364e35_10.0.18362.1_none_fb86e15d293d8d62\msg.exe

and msg.exe.mui (to go in C:\Windows\System32\en-US)

  • C:\Windows\WinSxS\amd64_microsoft-windows-t..etoolsmqq.resources_31bf3856ad364e35_10.0.18362.1_en-us_f257f72e582e10e5\msg.exe.mui

However, first they need to be decompressed (shameless self-promotion) using SXSEXP:

> sxsexp64.exe msg.exe expand\msg.exe
Processing target path  msg.exe
msg.exe => expand\msg.exe
File size               12602 bytes

DCS_HEADER found.

 NumberOfBlocks         1
 UncompressedFileSize   26112

DCS_BLOCK #1
 Block->CompressedBlockSize     0000312A
 Block->DecompressedBlockSize   00006600
Operation Successful
> sxsexp64.exe msg.exe.mui expand\msg.exe.mui
Processing target path  msg.exe.mui
msg.exe.mui => expand\msg.exe.mui
File size               2150 bytes

DCS_HEADER found.

 NumberOfBlocks         1
 UncompressedFileSize   7680

DCS_BLOCK #1
 Block->CompressedBlockSize     00000856
 Block->DecompressedBlockSize   00001E00
Operation Successful

These decompressed files are what need to be copied to C:\Windows\System32 and C:\Windows\System32\en-US respectively to use MSG.

0

Not my original idea.. but here's what I how I use vbs but not really..(the file is automaticllly deleted)

echo x=msgbox("Hey! Here is a message!" ,4096, "Hey! Here is a title!") > %tmp%\tmp.vbs && cscript //nologo %tmp%\tmp.vbs & del %tmp%\tmp.vbs

Refer to this answer

3
  • Instead of submitting an answer, you should have flagged this question as a duplicate.
    – Ramhound
    Nov 23, 2020 at 10:23
  • I didn't know that was a thing. This was my first answer to a Qs.. and willl probably remain like that for 1 or 2 years. So if you could please do flag this Qs as you consider necessary Jan 27, 2021 at 17:46
  • I already flagged this as a duplicate 3 months ago when I submitted that comment. So now you are aware you should flag as a duplicate instead of submitting an answer pointing to another answer.
    – Ramhound
    Jan 27, 2021 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.