/admin/win/nsi/nsis_processes/src/processes.txt

http://github.com/tomahawk-player/tomahawk · Plain Text · 122 lines · 78 code · 44 blank · 0 comment · 0 complexity · 3a95b6c6321a35e90ba94f90fc81c732 MD5 · raw file

  1. ----------------------------------------------------------------
  2. ----------------------------------------------------------------
  3. Processes (Processes.dll)
  4. Version: 1.0.0.1
  5. Release: 12.december.2004
  6. Description:Nullsoft Installer (NSIS) plug-in for managing?!
  7. Windows processes.
  8. Copyright: Š 2004 Hardwired. No rights reserved.
  9. There is no restriction and no guaranty for using
  10. this software.
  11. Author: Andrei Ciubotaru [Hardwired]
  12. Lead Developer ICode&Ideas SRL (http://www.icode.ro)
  13. hardwiredteks@gmail.com, hardwired@icode.ro
  14. ----------------------------------------------------------------
  15. ----------------------------------------------------------------
  16. INTRODUCTION
  17. The Need For Plug-in - I need it for the one of my installers.
  18. Briefly: Use it when you need to find\kill a process when
  19. installing\uninstalling some application. Also, use it when you
  20. need to test the presence of a device driver.
  21. SUPPORT
  22. Supported platforms are: WinNT,Win2K,WinXP and Win2003 Server.
  23. DESCRIPTION
  24. Processes::FindProcess <process_name.exe>
  25. Searches the currently running processes for the given
  26. process name.
  27. return: 1 - the process was found
  28. 0 - the process was not found
  29. Processes::KillProcess <process_name.exe>
  30. Searches the currently running processes for the given
  31. process name. If the process is found then the it gets
  32. killed.
  33. return: 1 - the process was found and killed
  34. 0 - the process was not found or the process
  35. cannot be killed (insuficient rights)
  36. Processes::FindDevice <device_base_name>
  37. Searches the installed devices drivers for the given
  38. device base name.
  39. (important: I said BASE NAME not FILENAME)
  40. return: 1 - the device driver was found
  41. 0 - the device driver was not found
  42. USAGE
  43. First of all, does not matter where you use it. Ofcourse, the
  44. routines must be called inside of a Section/Function scope.
  45. Processes::FindProcess "process_name.exe"
  46. Pop $R0
  47. StrCmp $R0 "1" make_my_day noooooo
  48. make_my_day:
  49. ...
  50. noooooo:
  51. ...
  52. Processes::KillProcess "process_name.exe"
  53. Pop $R0
  54. StrCmp $R0 "1" dead_meat why_wont_you_die
  55. dead_meat:
  56. ...
  57. why_wont_you_die:
  58. ...
  59. Processes::FindDevice "device_base_name"
  60. Pop $R0
  61. StrCmp $R0 "1" blabla more_blabla
  62. blabla:
  63. ...
  64. more_blabla:
  65. ...
  66. THANKS
  67. Sunil Kamath for inspiring me. I wanted to use its FindProcDLL
  68. but my requirements made it imposible.
  69. Nullsoft for creating this very powerfull installer. One big,
  70. free and full-featured (hmmm... and guiless for the moment) mean
  71. install machine!:)
  72. ME for being such a great coder...
  73. ... HAHAHAHAHAHAHA!
  74. ONE MORE THING
  75. If you use the plugin or it's source-code, I would apreciate
  76. if my name is mentioned.
  77. ----------------------------------------------------------------
  78. ----------------------------------------------------------------