net send in .net


Hi,
 I am trying to execute net send comman in my vb.net code. But I am getting "win32 exception unhandled error". Please help me. My code is:Dim psi As New ProcessStartInfo()
psi.UseShellExecute = False
psi.FileName = "Net send"
'xxx.xxx.xx.xx  - IP address of a system in my network
psi.Arguments = "xxx.xxx.xx.xx test"
Process.Start(psi)
 Thanks in advance!
Shwetha
1
Shwetha123
12/3/2007 10:18:20 AM
📁 asp.net.getting-started
📃 91979 articles.
⭐ 4 followers.

💬 4 Replies
👁️‍🗨️ 5839 Views



Tryu changing
psi.FileName = "Net send"
'xxx.xxx.xx.xx  - IP address of a system in my network
psi.Arguments = "xxx.xxx.xx.xx test"
to
psi.FileName = "net.exe"
'xxx.xxx.xx.xx  - IP address of a system in my network
psi.Arguments = "Send xxx.xxx.xx.xx test"
Hope it helps
-1
Klaus
12/3/2007 10:43:56 AM

Hi Shwetha,
You just need to do a small modification to your code. Instead of "Net Send" in the place of the filename, give "Net". Change your code as below: Dim psi As New ProcessStartInfo()
psi.UseShellExecute = False
psi.FileName = "Net"
'xxx.xxx.xx.xx  - IP address of a system in my network
psi.Arguments = "Send xxx.xxx.xx.xx test"
Process.Start(psi)
Thats it!
I did the same mistake when I came over a similar situation.
 Smile
Bye
Prabaa
1
V
12/3/2007 10:44:23 AM

Oh!
Thank you so much
0
Shwetha123
12/3/2007 10:50:06 AM

Thank you so much Prabaa.
0
Shwetha123
12/3/2007 10:50:34 AM
Reply: