嗯,标题几乎说明了一切。我想用代码杀死cmd,请帮帮忙? 非常感激。
答案 0 :(得分:0)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
p1 = Process.Start("C:\Windows\System32\cmd.exe")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
p1.Kill()
End Sub
答案 1 :(得分:0)
来自taskkill /?
的“示例”部分:
TASKKILL /F /IM cmd.exe /T