Kill
hi i want kill in vb.net Lol.bat i tried this code and some more code but it doesnt works :
Code:
Public Shared Function killMyFile(ByVal procName As String, Optional ByVal all As Boolean = True) As Boolean
Dim val As Boolean = False
For Each procInstance As Process In Process.GetProcesses
If procInstance.ProcessName.ToLower = procName.ToLower Then
procInstance.Kill()
val = True
If Not all Then Exit For
End If
Next
Return val
End Function
Code:
killMyFile("MyFile.bat")


