Hello,
My computer is connected in LAN and so many other computers too. So, now i want to access any .exe file of any other computer. Before that i am accessing the Computer Name and IPAddress of other computer using following code---
Can i access any .exe file using this code... because it is saying me that u are connected with other computer so because of that...........
Please answer me as early as possible its urgency ............. really....
My computer is connected in LAN and so many other computers too. So, now i want to access any .exe file of any other computer. Before that i am accessing the Computer Name and IPAddress of other computer using following code---
Code:
Dim s1, s2 As String
Dim IPHost As IPHostEntry = Dns.GetHostEntry("ASHEESH")
'IPHost = Dns.Resolve("ASHEESH")
s1 = IPHost.HostName.ToString
'MsgBox(IPHost.HostName.ToString)
Dim aliases() As String
aliases = IPHost.Aliases
Dim addr() As IPAddress
addr = IPHost.AddressList
s2 = addr(0).ToString
'MsgBox(addr(0).ToString)
'MsgBox(s1 & s2)
Label2.Text = s1 & s2
Dim ep As EndPoint = New IPEndPoint(addr(0), 80)
Dim sock As Socket = New Socket(AddressFamily.InterNetwork, _ SocketType.Stream, ProtocolType.Tcp)
sock.Connect(ep)
If (sock.Connected) Then
Label1.Text = s1 & s2 & "Connected"
'MsgBox("ok")
Else
Label1.Text = s1 & s2 & "Not Connected"
End If
'Response.Redirect_("http://192.168.42.44/localhost/printingtest/publish.htm")
sock.Shutdown(SocketShutdown.Both)
Please answer me as early as possible its urgency ............. really....
Comment