Jump to content

Recommended Posts

Posted (edited)

I have a couple of processes running on Windows that just won't die. I figured out something kinda cool you can use the /t and /f switches and sometimes but not always it will kill child processes. So sometimes you can't kill a process directly but you can force kill the parent process and that will kill the child process even if the parent process comes back access denied. I thought this was pretty novel.

So I want to kill two processes but they are both the parent and child process of each other. How do I kill them. If I can't do it from command line is there a .NET function that I can use with VB, C#, or VC++?

Edited by vailixi
Posted

2 processes can't be eachother's parent. One spawned the other, period. Unless I see code my position is that you're misreading your data.

Posted

Few things. Are they services? (check in services.msc). one process starting another, sounds more like dependencies in a service, which can restart themselves. AS cooper mentioned, only one process is the parent, but more than likely another process you don't see started it.

Check out process explorer from the msft sysinternals stuff. It will show you all processes, and a tree like structure under them which are the child prcoesses. It also lets you close them like task manager, but often works better than task manager when you get hung programs that won't let you kill them. Just right click and run as administrator first. Some services won't let you kill them eaisly, but can be shutdown in services.msc,and for those that don't show there, from the command line(run as admin first) with "net stop servicename". you can also do "sc query" to see all running services.

Posted (edited)

Few things. Are they services? (check in services.msc). one process starting another, sounds more like dependencies in a service, which can restart themselves. AS cooper mentioned, only one process is the parent, but more than likely another process you don't see started it.

Check out process explorer from the msft sysinternals stuff. It will show you all processes, and a tree like structure under them which are the child prcoesses. It also lets you close them like task manager, but often works better than task manager when you get hung programs that won't let you kill them. Just right click and run as administrator first. Some services won't let you kill them eaisly, but can be shutdown in services.msc,and for those that don't show there, from the command line(run as admin first) with "net stop servicename". you can also do "sc query" to see all running services.

Thanks. Yeah I was looking at processes and not services. I will try stopping services.

Edited by vailixi

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...