*****************************************************************
***                nsProcess NSIS plugin v1.1                 ***
*****************************************************************

2005 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)

Source function FIND_PROC_BY_NAME based
   upon the Ravi Kochhar (kochhar@physiology.wisc.edu) code
Thanks iceman_k (FindProcDLL plugin) and
   DITMan (KillProcDLL plugin) for direct me


Features:
- Find/kill a process by name
- Kill all processes with specified name (not only one)
- The process name is case-insensitive
- Win95/98/ME/NT/2000/XP support
- Small plugin size (4,5 Kb)


**** Output variables ****
.r0-.r9 == $0-$9
.R0-.R9 == $R0-$R9


**** Find process ****
nsProcess::FindProcess "[file.exe]" .r0

"[file.exe]"  - Process name (e.g. "notepad.exe")

.r0  - $0=0    Success
       $0=603  Process was not currently running
       $0=605  Unable to load PSAPI.DLL
       $0=606  Unable to identify system type
       $0=607  Unsupported OS
       $0=700  Unable to get procedure address from PSAPI.DLL
       $0=701  Unable to get process list, EnumProcesses failed
       $0=702  Unable to load KERNEL32.DLL
       $0=703  Unable to get procedure address from KERNEL32.DLL
       $0=704  CreateToolhelp32Snapshot failed


**** Kill process ****
nsProcess::KillProcess "[file.exe]" .r0

"[file.exe]"  - Process name (e.g. "notepad.exe")

.r0  - $0=0    Success
       $0=602  Not all processes terminated successfully
       $0=603  Process was not currently running
       $0=604  No permission to terminate process
       $0=605  Unable to load PSAPI.DLL
       $0=606  Unable to identify system type
       $0=607  Unsupported OS
       $0=700  Unable to get procedure address from PSAPI.DLL
       $0=701  Unable to get process list, EnumProcesses failed
       $0=702  Unable to load KERNEL32.DLL
       $0=703  Unable to get procedure address from KERNEL32.DLL
       $0=704  CreateToolhelp32Snapshot failed
