Prompt to kill process

Prompt the end user for a permission to forcefully terminate a process running in their session.
Version 1.0.1
Created on 2019-03-20
Modified on 2019-03-20
Created by asafg
Downloads: 67

The Script Copy Script Copied to clipboard
dim sProcName

dim sPID 

dim iYesNo 

dim oShell

sProcName = WScript.Arguments.Item(0)

sPID = WScript.Arguments.Item(1)

iYesNo = msgbox("Your "& sProcName &" consumes excessive resources and may be interrupting the work of other users on this computer. Is it safe to abort it?",4,"ControlUp")
if iYesNo = 6 then
   Set oShell = CreateObject("WScript.Shell")
   oShell.Run "taskkill /PID "&sPID,0 , False
end if