Back to [[.:|Script Function Reference]]
====== Kill_Process() ======
The Kill_Process() function kills all running processes matching the specified filename.
===== Syntax =====
Kill_Process(filename)
===== Arguments =====
^ Argument ^ Required ^ Description ^
| //filename// | Yes | The filename of the process(es) you want to kill. If //filename// contains a backslash character ( //\// ) then it is expected to be a full absolute path\filename (e.g. c:\windows\notepad.exe). Any [[..:environment_variables|script environment variables]] found in //filename// will be replaced by their actual values when the script is executed. |
\\
===== Examples =====
Kill_Process(notepad.exe)
This kills any running process who's path-less filename is "notepad.exe"
Kill_Process(c:\windows\notepad.exe)
This kills any running process who's absolute full path\filename is "c:\windows\notepad.exe"
Kill_Process(%dbpath%\Joy2Key\JoyToKey.exe)
This kills the running process JoyToKey.exe if it was started from "%dbpath%\Joy2Key\"
===== Remarks =====
* Use this function with care: It will immediately and relentlessly TERMINATE all matching running processes, so be careful what you pass this function as an argument!
* This function is Windows XP/Vista/7 only. It does not support 9x. It also has not been tested on 64-bit versions.
===== See Also =====
* [[.:run_program|Run_Program()]]
* [[.:|Script Function Reference]]