After alot of google searching, I see it is possible to send a message from a Ubuntu computer to Windows XP computer with the follow smbclient code.

echo "hello world" | smbclient -M "WindowsHost" . Sends message and shows Windows Meesage Popup

However I haven't found a single person running Windows 7 or 8 that is able to send a message from Ubuntu or ANY OTHER distribution. I would think that it work work fine because Windows new message utility is MSG, which works if you send a message from Windows computer to Windows computer.

So why won't

echo "hello world" | smbclient -M "WindowsHost" send a popup message to Window Computer?

Alternative to smbclient to send message to Window 7 or 8 computer?


According to this:

Windows Vista, Windows 7, and Windows 8 have no Netsend command at all, and you need additional software to receive or send net messages, like our LanTalk NET.

So... no more smbclient to send a message to Windows Vista and higher.

According to this, Windows 7 does have the MSG.EXE-command but i haven't figured out if you can send a message from a Linux-based machine to Windows 7.

C:\>msg rik hello world
gives me the dialog below so the mechanism is still there.
Now we need to find a way to do it from Linux.

enter image description here

But it is certain that smbclient is not compatible with msg.exe.

You could try to Google for a Linux version


I did some searching and couldn't find any Linux-programs which can communicate with the standard MSG.EXE-service of Windows. Due to the many exploits of the net send-command by hackers and spammers Microsoft retired the service (as of Vista) and the new MSG.EXE communications are encrypted.

Next idea is to execute the MSG.EXE-command remotely on a Windows machine. This should be doable with the PsExec-service.

First i tried to use PsExec from Windows XP to Windows 7 (just to be sure PsExec worked).
But i got an "access denied"-error. From here i followed the first suggestion and the registry change on the target Windows 7 worked:
(i also needed to do this on a clean Windows 8.1 machine i tested with as target)

reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f

(If "Windows (PsExec) -> Windows" doesn't work "Linux (winexe) -> Windows" certainly wouldn't work.)

Next i installed winexe on my ancient Fedora 3 server from 2004. (Yeah... i know ;).
I got a lot of warnings during compilation but non were fatal.

wget http://downloads.sourceforge.net/project/winexe/winexe-1.00.tar.gz
tar xzvf winexe-1.00.tar.gz
cd winexe-1.00/source4/

bin/winexe -U user%password //xps8500 'cmd'
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.


I got the command-prompt from the remote system.

Next the command:

bin/winexe -U user%password //xps8500 'msg rik hello world'

and i got the same image as above. So that works. It's not very pretty to use PsExec/winexe to execute MSG.EXE, but hey... it works ;)

(just test every system you need if they can be used as target for PsExec or can receive a MSG.EXE-message with /server:x from another Windows machine you PsExec to)

Personally i don't like a dialog popping up during my work (blocking everything i type), so i use a small less intrusive messaging system, which pops out a small window near the system tray (which disappears after a timeout) but that requires additional software. There are a lot of simple messaging programs you could use. You could also code your own. It doesn't have to be fancy to just show a popup in the right-bottom corner.

| improve this answer | |
  • Hey Rik, I found this way: askubuntu.com/questions/335026/… – Benjamin Jones Jan 8 '14 at 22:07
  • Yeah i was just about to add this link. Using a psexec-like command to run the msg.exe on the Windows machine seems like a long way around but would work ;) – Rik Jan 8 '14 at 22:10
  • 1
    Yup. That looks about right. (I'll try that tomorrow too, on my Linux-server). I will also Google some more for a more native (compatible) solution. – Rik Jan 8 '14 at 22:16
  • 1
    Added an Edit with my experience with winexe (Linux alternative to PsExec) – Rik Jan 9 '14 at 11:30
  • 1
    Yes. You can read about my experience with winexe (compilation and running it) in my edit (halfway my answer:). bin/winexe -U user%password //xps8500 'msg rik hello world' worked beautifully. – Rik Jan 9 '14 at 18:50

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.