Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1682
  • Last Modified:

Unable to terminate a Windows process

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
ddantes
Asked:
ddantes
  • 2
1 Solution
 
KeldenCommented:
try:

taskkill /F /IM RealtimeSync_W32.exe

/F will force the termination
/IM is needed to find the right process
0
 
ddantesAuthor Commented:
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
 
Amit KhilnaneyCommented:
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
 
ddantesAuthor Commented:
Works like a charm.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now