Solved

Unable to terminate a Windows process

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Hi Friends, These registry tweaks will help you optimizing your Windows 7 system for any VDI. This will improve the machine performanance and can be used on normal systems also. These are few registry tweaks which will add value by enhancing the …
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.
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). …
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now