Solved

Unable to terminate a Windows process

Posted on 2012-03-24
4
1,481 Views
Last Modified: 2012-08-14
Running Windows 7, I am trying to create a batch file to terminate a Windows process with "taskkill".  It is an executable file with the path: "C:\Program Files\FreeFileSync\Bin\RealtimeSync_W32.exe"    If I include the entire path, the error is: "invalid query".  If I include only the name of the executable file, the error is: "process does not exist."
0
Comment
Question by:ddantes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 2

Expert Comment

by:Kelden
ID: 37761416
try:

taskkill /F /IM RealtimeSync_W32.exe

/F will force the termination
/IM is needed to find the right process
0
 

Author Comment

by:ddantes
ID: 37761427
Thank you for your comment.  As it turns out, there is a parent process (RealtimeSync.exe) which causes the RealtimeSync_W32.exe to launch.  Terminating the parent process, and forcing termination of the child process works:

taskkill /IM "RealtimeSync.exe" /F /T

Would you mind showing me how to convert this command line to a batch file?
0
 
LVL 8

Accepted Solution

by:
Amit Khilnaney earned 250 total points
ID: 37761435
just copy the command in a notepad and save the file as "xyz.bat"

Include the quotes while saving a file and save as type "All types"
0
 

Author Closing Comment

by:ddantes
ID: 37761540
Works like a charm.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So many times I have seen the words written in a question "if only I could show you" or " I know how hard it is for you since you can't see it" in any zone. That has inspired me to write about this tool in windows 7 called "Problem Steps Recorder…
By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question