(view source code of killntpr2.bat as plain text)
:: Keep variables local
:: Explain usage if no parameter was given.
:: Initialize main variable.
:: Display which process is about to get killed.
:: Lines with CMD.EXE are filtered out, because otherwise
:: this batch file might accidently kill itself later.
TLIST | FIND /I " %1 " | FIND /I /V "CMD.EXE"
:: Ask confirmation unless /Y parameter was specified.
ECHO Are you sure you want to kill this process?
:: Find the process ID for the specified program
:: Kill the process by its process ID.
:: Display help screen
ECHO KILLNTPR.BAT, Version 2.11
ECHO KILL NT PRocess
ECHO Written by Rob van der Woude
ECHO Usage: KILLNTPR program_name [ /Y ]
ECHO program_name is the file name of the executable
ECHO with extension but without path
ECHO This batch file uses some utilities from the MS Windows NT Resource Kit.
|page last uploaded: 2016-12-15, 11:20|