什么是脚本/代码杀死CMD?

时间:2013-02-21 07:00:31

标签: cmd

嗯,标题几乎说明了一切。我想用代码杀死cmd,请帮帮忙? 非常感激。

2 个答案:

答案 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