How do I close a sub process from task manager in command prompt

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Hanomnom
Posts: 2
Joined: 01 Nov 2019 08:50

How do I close a sub process from task manager in command prompt

#1 Post by Hanomnom » 01 Nov 2019 09:17

Hi Guys,

I'm using a batch file to auto run and close a 3D program to automate repetitive process. Unfortunately when I force close the program an error pops up (it does not affect the automation). When a lot of these open it eats up RAM so i need to close them.

I would like to close the process called Grasshopper breakpoint using command command prompt. I can then create a batch file and launch it from inside Rhino.

Notes on what I have attempted:
I can't just kill the main process Rhino.exe as there is multiple iterations of the software running.
I have tried using tasklist but i cant find the process
I also tried a script I found online for /f "tokens=3,*" %a in ('tasklist /fo list /v ^| find "Window Title"') do @if not "%a"=="N/A" echo %a %b to get the widow titles I couldn't find anything that matched the Grasshopper breakpoint window (see below)

C:\Users\User1>for /f "tokens=3,*" %a in ('tasklist /fo list /v ^| find "Window Title"') do @if not "%a"=="N/A" echo %a %b
DWM Notification Window
AMD EEU Client
Windows Push Notifications Platform
Task Host Window
AsRoutineController
GPU Tweak II
Start
Search
USB 3.0 Boost Service
OleMainThreadWndName
Realtek Jack Information
G
.NET-BroadcastEventWindow.4.0.0.0.5c39d4.0
Microsoft Edge
Microsoft Store
OleMainThreadWndName
OleMainThreadWndName
Microsoft Text Input Application
New notification
OLEChannelWnd
OleMainThreadWndName
Calculator
OleMainThreadWndName
Settings
Command Prompt
OLEChannelWnd
Microsoft Edge
OleMainThreadWndName
Task Manager
DosTips.com - Post a new topic - Google Chrome
*sub process identifier.txt - Notepad
Gumshield Processing Server
Untitled.3dm (19 KB) - Rhinoceros 6 Evaluation (45 Days Remaining)
Snipping Tool
Untitled.3dm (19 KB) - Rhinoceros 6 Evaluation (45 Days Remaining)



Please note I am very new to DOS and I am trying my best so please excuse my ignorance. Any help would be greatly appreciated.

Regards,
Kevin
Attachments
Breakpoint.PNG
Breakpoint.PNG (16.66 KiB) Viewed 11872 times
sub process.PNG
sub process.PNG (44.6 KiB) Viewed 11872 times

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: How do I close a sub process from task manager in command prompt

#2 Post by aGerman » 01 Nov 2019 12:55

If you right-click on Grasshopper breakpoint in the task manager list, do you see a "Go to details" menu item? If so, what process in the Details tab is marked if you click this item?

Steffen

Hanomnom
Posts: 2
Joined: 01 Nov 2019 08:50

Re: How do I close a sub process from task manager in command prompt

#3 Post by Hanomnom » 05 Nov 2019 04:31

Hi Steffan,

Thanks for you response. When I right click on it, it does not give me the option to go to details ( please see the image below)

Best,
Kevin

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: How do I close a sub process from task manager in command prompt

#4 Post by aGerman » 05 Nov 2019 12:37

No image attached. However, in that case you're out of luck.
Have a look at this thread:
viewtopic.php?f=3&t=7583&p=50401
Maybe SendMessage.exe or closewindow.exe (a few postings further down in the same thread) could be helpful.

Steffen

Post Reply