Click here to Skip to main content
15,868,164 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Good evening, I've been trying to create my own C# program that can message another Computer within the network. Unfortunately, none works. Please help me to make a C# Program that can pop-up message or notification message another computer within its network.

What I have tried:

I tried
Process process = new Process();
           process.StartInfo.FileName = "cmd.exe";
           process.StartInfo.CreateNoWindow = true;
           process.StartInfo.RedirectStandardInput = true;
           process.StartInfo.RedirectStandardOutput = true;
           process.StartInfo.UseShellExecute = false;
           process.Start();
           process.StandardInput.WriteLine("msg * /server:192.168.1.14 hello goodevening");
           process.StandardInput.Flush();
           process.StandardInput.Close();
           process.WaitForExit();
           Console.WriteLine(process.StandardOutput.ReadToEnd());
           Console.ReadKey();

and many other codes
Posted
Updated 2-Apr-18 7:13am
Comments
[no name] 2-Apr-18 12:09pm    
First of all I would start msg.exe without the help of cmd.exe ;)

1 solution

 
Share this answer
 
Comments
Babiiii 2-Apr-18 21:12pm    
I'll try it sir. Thank you so much

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900