Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!
So, I thought of executing the same statement from a C# program and copied this code from Internet.
C:\WINDOWS\System32\MSG [windowsusername] "Hello"
When I run the above code, unfortunately nothing happens. Does anyone have any idea what is going wrong here?
System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; startInfo.FileName = "cmd.exe"; startInfo.Arguments = @" /C MSG Amit.Jain Hello"; process.StartInfo = startInfo; process.Start(); process.WaitForExit(100); process.Close(); process.Dispose();
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.