strPName = "notepad.exe"
strComputer = "."
Set obj
shell = CreateObject("Wscript.Shell")
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!" & strComputer & "rootcimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = '" & strPName & "'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
WScript.Sleep 2000
objshell.Run "c:windowssystem32notepad.exe"