A tool for managing multiple running dos batches
Moderator: DosItHelp
-
- Posts: 5
- Joined: 05 May 2021 09:01
A tool for managing multiple running dos batches
Hi,
We have 23 batches running on one of the servers. All of them are started with TITTLEs, to identify each one visually.
But even with the TITLEs, it's still cumbersome to find a specific batch, in order to close it temporarily while working on a problem related to that batch.
Unfortunately, Task Manager doesn't display the title. Instead, for each running batch, it simply shows a generic "Windows Command Processor" for each batch file.
So, my question, is there a tool to manage batch files? Something that shows the list in a browse screen or grid, and allows us to close it.
The tool can be commercial or free, doesn't matter. It could also be very simple, just something to close running batches without having to search through each window on the desktop.
Do you know of anything like this?
We have 23 batches running on one of the servers. All of them are started with TITTLEs, to identify each one visually.
But even with the TITLEs, it's still cumbersome to find a specific batch, in order to close it temporarily while working on a problem related to that batch.
Unfortunately, Task Manager doesn't display the title. Instead, for each running batch, it simply shows a generic "Windows Command Processor" for each batch file.
So, my question, is there a tool to manage batch files? Something that shows the list in a browse screen or grid, and allows us to close it.
The tool can be commercial or free, doesn't matter. It could also be very simple, just something to close running batches without having to search through each window on the desktop.
Do you know of anything like this?
Re: A tool for managing multiple running dos batches
My proposal:
- open Task Manager
- select the "Details" tab
- right-click the header of an arbitrary column and click item "Select columns"
- scroll the list and check "Command line"
- click OK
In the command lines of the cmd.exe processes you'll find the name of the Batch script each. I guess it'll be sufficently easy to find and terminate the right process now.
Steffen
- open Task Manager
- select the "Details" tab
- right-click the header of an arbitrary column and click item "Select columns"
- scroll the list and check "Command line"
- click OK
In the command lines of the cmd.exe processes you'll find the name of the Batch script each. I guess it'll be sufficently easy to find and terminate the right process now.
Steffen
-
- Posts: 5
- Joined: 05 May 2021 09:01
Re: A tool for managing multiple running dos batches
I'll try this on Thursday, thanks Steffen.
Re: A tool for managing multiple running dos batches
TASKLIST with verbose output will also show you what you want. Then you can use TASKKILL.
Re: A tool for managing multiple running dos batches
what does this TASKKILL command do?
-
- Posts: 5
- Joined: 05 May 2021 09:01
Re: A tool for managing multiple running dos batches
Hi Squash,
Thanks, but I think the users need an interface. But you're right, TASKLIST can be useful in some contexts, when writing batches that need to check if other batches are running.
Thanks, but I think the users need an interface. But you're right, TASKLIST can be useful in some contexts, when writing batches that need to check if other batches are running.
Re: A tool for managing multiple running dos batches
Code: Select all
H:\>taskkill /?
TASKKILL [/S system [/U username [/P [password]]]]
{ [/FI filter] [/PID processid | /IM imagename] } [/T] [/F]
Description:
This tool is used to terminate tasks by process id (PID) or image name.
Parameter List:
/S system Specifies the remote system to connect to.
/U [domain\]user Specifies the user context under which the
command should execute.
/P [password] Specifies the password for the given user
context. Prompts for input if omitted.
/FI filter Applies a filter to select a set of tasks.
Allows "*" to be used. ex. imagename eq acme*
/PID processid Specifies the PID of the process to be terminated.
Use TaskList to get the PID.
/IM imagename Specifies the image name of the process
to be terminated. Wildcard '*' can be used
to specify all tasks or image names.
/T Terminates the specified process and any
child processes which were started by it.
/F Specifies to forcefully terminate the process(es).
/? Displays this help message.
Filters:
Filter Name Valid Operators Valid Value(s)
----------- --------------- -------------------------
STATUS eq, ne RUNNING |
NOT RESPONDING | UNKNOWN
IMAGENAME eq, ne Image name
PID eq, ne, gt, lt, ge, le PID value
SESSION eq, ne, gt, lt, ge, le Session number.
CPUTIME eq, ne, gt, lt, ge, le CPU time in the format
of hh:mm:ss.
hh - hours,
mm - minutes, ss - seconds
MEMUSAGE eq, ne, gt, lt, ge, le Memory usage in KB
USERNAME eq, ne User name in [domain\]user
format
MODULES eq, ne DLL name
SERVICES eq, ne Service name
WINDOWTITLE eq, ne Window title
NOTE
----
1) Wildcard '*' for /IM switch is accepted only when a filter is applied.
2) Termination of remote processes will always be done forcefully (/F).
3) "WINDOWTITLE" and "STATUS" filters are not considered when a remote
machine is specified.
Examples:
TASKKILL /IM notepad.exe
TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
TASKKILL /F /IM cmd.exe /T
TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"
TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM notepad.exe
TASKKILL /S system /U domain\username /FI "USERNAME ne NT*" /IM *
TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"
H:\>
Re: A tool for managing multiple running dos batches
Not that hard to build a menu driven interface from the output of the TASKLIST command.DosAppreciator wrote: ↑06 May 2021 07:17Hi Squash,
Thanks, but I think the users need an interface. But you're right, TASKLIST can be useful in some contexts, when writing batches that need to check if other batches are running.
-
- Posts: 5
- Joined: 05 May 2021 09:01
Re: A tool for managing multiple running dos batches
Yes, but it's not necessary to add another component to the project, Squash. The Details pane in the Task Manager with the Command line showing, is sufficient.
Anyway, thanks for the suggestion.
Anyway, thanks for the suggestion.