Reputation: 987
So far, I've found plenty of ways to send and receive files over a network (mostly from this site), but I haven't been able to find a tutorial on how to do one with no listening software on the receiving side.
Example:
I want to send a messagebox with the title Hello, and the body There.
Normally, I would write out MessageBox.Show("Hello","There");
However, I want to be able to send the MessageBox
over a network.
How would I do this, keeping in mind that:
Thanks in advance for anyone who helps me with this problem.
EDIT: It doesn't HAVE to be a MessageBox
, I could make a forum that looks like one.
Upvotes: 0
Views: 2723
Reputation:
It is Possible with the msg.exe tool included in windows. use the command
Shell("cmd.exe /c msg * /SERVER:" & ipAddress & " " & deineNachricht)
If your PC doesn't have msg, download it from somewhere.
Upvotes: 0
Reputation: 5522
Try looking into the code of this project- it used the net send command line program to send messages to remote machines, although i'm not sure how your mileage will go without admin privileges:
Upvotes: -1
Reputation: 1354
You can shell out and call PsExec from Sysinternals to both copy and then run a program on a remote machine on your network - the program could be a listener you write or it could just be a program that displays a message it was given on the command line. PsExec isn't doing anything you couldn't do by calling the Windows API & using RPC directly, but that's a lot of work :) Privileges will probably be an issue. At the end of the day there's no way for a non-admin user, out of the box, to muck with another machine on the network. You'll need permissions to be relaxed - maybe using group policy? But if you have group policy in place, just install a listener using an .msi or a login script.
Are you able to provide more information on WHY you want to do this? Perhaps there's a better way of achieving the notification you're after.
Upvotes: 1
Reputation: 210402
It's like saying, "Can I force you to do what I tell you, even if you're not listening to what I'm saying?"
To which the answer is, obviously, no.
If the other guy isn't plannig to respond to what you're saying, then, well, he won't.
Upvotes: 3
Reputation: 740
You can't do this with a MessageBox, as that would be a pretty big loophole.
If you were using Windows XP, you might be able to use the "net send" command from the command line (hence callable in some way from a C# program, or from a batch file; whatever floats your boat), depending on the configuration of the machines.
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_send.mspx
There was an equivalent program called msg.exe in Windows Vista, but it was removed altogether in Windows Seven.
-
In short, not with Windows Seven no.
Upvotes: 1