How to terminate a process in vbscript

前端 未结 3 2005
余生分开走
余生分开走 2020-12-09 18:47

How can I terminate process using vbscript. PLEASE NOTE, I need to terminate process that runs under windows 64-bit environment as native 64 (not using select * from win_32_

3条回答
  •  北海茫月
    2020-12-09 19:15

    Dim shll : Set shll = CreateObject("WScript.Shell")
    Set Rt = shll.Exec("Notepad") : wscript.sleep 4000 : Rt.Terminate
    

    Run the process with .Exec.

    Then wait for 4 seconds.

    After that kill this process.

提交回复
热议问题