Solved

Unable to terminate a Windows process

Posted on 2012-03-24
4
1,391 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
  • 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
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.

820 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