home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / vrac / ntkill.zip / README.NT < prev   
Text File  |  1994-10-05  |  7KB  |  153 lines

  1. this program is designed to assist in killing applications.
  2.  
  3. Specifically helpfull for killing win16 applications. 
  4.  
  5. There already is a good kill program called killproc available or pview
  6. that can kill all processes.
  7.  
  8. However, for win16 processes these applications will either kill all ntvdm's
  9. (ie all win 16 appliations under daytona), or a selected ntvdm.  Using
  10. these applications there is no way to tell which ntvdm is the one for the
  11. win16 application you want to terminate.
  12.  
  13. For this reason I implemented the kill and ps programs.
  14.  
  15. for help on the kill program issue the command 'kill' with no parameters
  16. and you will get the follwoing output:
  17.    
  18.                       USAGE for kill Version 1.0 by L. Kahn (C) 1994               
  19.      -------------------------------------------------------------------------------
  20.      Kill [process_id] [-c classname] [-t [\"]textname[\"]]          
  21.         WHERE either a process_id, a classname or a textname is required,
  22.           AND process_id is the id of the process you wish to kill (This can be
  23.               retrieved via the 'ps' (process status) program.
  24.               classname or textname are the class name or the textual (title) name
  25.               of the window(s) you wish to kill, also accessed via 'ps'
  26.      Quotation marks can be use around the text name in case it contains blanks.
  27.      The program will access the window (if terminating by class or textname)
  28.      and attempt to kill the application cleanly via a WM_CLOSE message.
  29.      If this fails (ie the app is not well behaved or is hung and not processing 
  30.      messages), then an attempt is then made to kill the entire process via a 
  31.      TerminateProcess call (ie termination with Extreme prejudice...<g>)!
  32.      If terminating by process id the entire process is terminated!
  33.      NOTE: This program will kill ALL applications/processes that match the 
  34.            search criteria!
  35.      NOTE: RE: terminating WIN16 applications - 
  36.      Since terminating an entire process can kill more than one application (i.e., 
  37.      if you haven't set up your win16 apps to run in separate NTVDM's), the 
  38.      recommended method to use this program is to issue 'ps' and get either the 
  39.      window class name or text name and then use the -c or -t options to terminate
  40.      only the application desired.
  41.  
  42.  
  43.  
  44. PS is modeled after the unix ps (process status) command and will enumerate
  45. through all windows on the system listing the associated process id (PID)
  46. and window class name and text name (ie the window title).
  47.  
  48. Based on this information you can figure out the name of the application
  49. you want to terminate and then cleanly terminate it using the WM_CLOSE
  50. message. This is assuming the application is a windows app and well behaved
  51. (ie processes this message and also that it is not hung).  IF this method
  52. of termination fails the entire process is then terminated anyway.
  53.  
  54. You can also terminate an entire process directly just like the killproc
  55. program, except you must issue the command 'kill PID' where PID is the
  56. process id returned from the 'ps' program.
  57.  
  58. NOTE: case is important when terminating by class or text name.
  59.  
  60. Here is an example output of the output from PS:
  61.  
  62.  
  63.       Process List (by Window) program By L. Kahn (C) 1994
  64. -----------------------------------------------------------------
  65.  
  66.    PID CLASS NAME           TEXT NAME
  67. -----------------------------------------------------------------
  68.     51 NDDEAgnt             NetDDE Agent             
  69.      0 #32772                                        
  70.    202 ConsoleWindowClass   I:\WINNT\system32\cmd.exe - ps 
  71.    200 ConsoleWindowClass   I:\WINNT\system32\cmd.exe - e readme.nt
  72.    198 UIW_MDIFRAME         Eudora                   
  73.    198 ZINC_TASK_MANAGER    Eudora                   
  74.    198 WOWExecClass         WOWExec                  
  75.    221 UIW_WINDOW           Progress                 
  76.    221 UIW_MDIFRAME         Eudora                   
  77.    221 ZINC_TASK_MANAGER    Eudora                   
  78.    221 WOWExecClass         WOWExec                  
  79.    190 WOWExecClass         WOWExec                  
  80.    198 ConsoleWindowClass   CSN Eudora               
  81.    221 ConsoleWindowClass   Interpath Eudora         
  82.    190 ConsoleWindowClass   Smtp Deamon              
  83.     78 AppTermClass                                  
  84.     78 AppTermClass                                  
  85.     78 #32772                                        
  86.     78 WFS_Frame            File Manager - [J:\*.* - ]
  87.    130 TakoHachi            Task List                
  88.    155 #32772                                        
  89.    155 NTbanWClass          NTbanner                 
  90.    130 ComboLBox                                     
  91.     78 ComboLBox                                     
  92.    147 #32772                                        
  93.    147 SciCalc              Calculator               
  94.    149 #32772                                        
  95.    149 Volume               Volume Control           
  96.    174 #32772                                        
  97.    174 Cardfile             Cardfile - ADDRESS.CRD   
  98.    130 #32772                                        
  99.    130 Progman              Program Manager - AMBRA-TP60VL2\larry
  100.    190 #32772                                        
  101.    190 ISMTPD               IMAIL SMTP Server        
  102.    189 #32772                                        
  103.    189 MicroEMACS:frame     MicroEMACS               
  104.  
  105.  
  106. For instance to kill all occurances of Eudora on your system you would
  107. issue the command 'kill -t Eudora'
  108.  
  109. example output from this command:
  110.  
  111. J:\>kill -t Eudora
  112. Attempting to kill/close Window UIW_MDIFRAME (Eudora) cleanly
  113.   Window UIW_MDIFRAME (Eudora) closed!
  114. Attempting to kill/close Window UIW_MDIFRAME (Eudora) cleanly
  115.   Window UIW_MDIFRAME (Eudora) closed!
  116.  
  117. J:\>
  118.  
  119.  
  120. To kill only the ipswitch smtp deamon you would issue the
  121. command 'kill -c ISMTPD' or 'kill 190'
  122.  
  123. Example output from this command:
  124.  
  125.  
  126. J:\>kill -c ISMTPD
  127. Attempting to kill/close Window ISMTPD (IMAIL SMTP Server) cleanly
  128.   Window ISMTPD (IMAIL SMTP Server) closed!
  129.  
  130. J:\>
  131.  
  132. An alternate way to kill only one of the eudora's would be to issue
  133. the command: 'kill 198'
  134.  
  135.  
  136.  
  137. This program is freeware but all donations are welcome.
  138.  
  139. Source may be provided to specific users upon request for porting to other
  140. platforms.
  141.  
  142.  
  143. larry kahn
  144. 6550 countryside drive
  145. fayetteville N.C. 28311
  146.  
  147. 910-630-0412
  148.  
  149. I can be reached for problems or comments at
  150. 71534,600 on compuserve
  151. or kahn@kahn.pdial.interpath.net, kahn@drcoffsite.com, or kahn@csn.org
  152.  
  153.