11-10-20 02:46 AM
12-10-20 02:04 AM
12-10-20 05:33 AM
12-10-20 06:15 AM
12-10-20 10:24 PM
08-11-22 06:36 PM
09-11-22 03:31 PM
10-11-22 05:33 PM
10-11-22 08:32 PM
11-11-22 05:06 AM
Hello @SimanchalaPatta
Utility -Environment" --> Kill process uses Process.Kill.
This is description of Process.Kill Method : Process.Kill Method (System.Diagnostics) | Microsoft Learn
It says:
WaitForExit and HasExited will indicate that exiting has completed after the given process exits, even if all descendants have not yet exited.
So I made Code Stage. "ProcessName" is a input argument.
Dim p As New System.Diagnostics.Process()
p.StartInfo.FileName = System.Environment.GetEnvironmentVariable("ComSpec")
p.StartInfo.Arguments = "/c taskkill /F /T /FI ""username eq %USERNAME%"" /IM " & ProcessName
p.StartInfo.UseShellExecute = false
p.StartInfo.CreateNoWindow = true
p.Start()
p.WaitForExit()
p.Close()