Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27203

VS 2012 Sending Message through the network

$
0
0
Hey guys,

I have been building a quick small application that I can use to send a quick network message to a user on a computer. Everytime I have called a process in the past it works like a charm so I imagined this task to be pretty simple, but how wrong was I.

Below I have put what I have written so far but I keep getting "file not found" error and I can't see why as I have triple checked for spelling mistakes. There seems to be nothing wrong with the path as I can use the run command and go straight to it. Any ideas?

Code:

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim hostname As String = TextBox1.Text
        Dim message As String = TextBox2.Text
        Dim msg As New ProcessStartInfo("%systemroot%\System32\msg.exe", "* /server:" & hostname & " " & message)
        Process.Start(msg)
    End Sub
End Class

Name:  vberror.png
Views: 24
Size:  98.9 KB
Attached Images
 

Viewing all articles
Browse latest Browse all 27203

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>