Auto-kill a process

Page 1 of 2 12 LastLast

  1. Posts : 234
    Windows 10
       #1

    Auto-kill a process


    Is there a way to auto-sense that a process has started and automatically kill it, without user intervention? I am aware of Auto-kill any process v.2.2, but that, according to one reviewer, requires user input. Thanks.
      My Computers


  2. Posts : 42,955
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Hi, you can create a small Autohotkey script containing a loop in which you would, at intervals, test if the process exists and then close it or kill it.

    Simply search for Autohotkey. It comprises an extensive syntax with which simple programs can be written, interacting with Windows and GUI features.

    In your case, just a simple loop with a couple of statements would be needed.
    I use this to close Ashampoo advertising popups, for example.
      My Computers


  3. Posts : 234
    Windows 10
    Thread Starter
       #3

    Appreciate the suggestion. I use a .bat file here to do essentially what you describe, but my aim is to automate the process - no user intervention. A specified process opens; it spots and kills it. Closest that I have seen is an app that claims to do this on a schedule.
      My Computers


  4. Posts : 193
    Windows 10 Pro
       #4

    If you're already using a batch file, perhaps the built-in TaskKill utility would work for you?
    You can then add delay times, etc, in the batch file.
    You could also add it to a scheduled task to run one time x minutes after the computer starts.
      My Computer


  5. Posts : 234
    Windows 10
    Thread Starter
       #5

    Yes, TaskKill is in use. Unfortunately, the process/es in question repeatedly reassert themselves. Thus, the kill util would need to detect that, and take the appropriate action - repeatedly. A method to prevent a process from running in the background would be an alternative, while still allowing the app itself to run on demand.

    To wit: the BG process for a specific app here does not appear when the app is run. It pops up randomly in Task Manager after the app is closed; that's what should be prevented or killed.
      My Computers


  6. Posts : 193
    Windows 10 Pro
       #6

    Expanding on the batch file possibility, you could use the tasklist command (appropriately filtered) to determine if the task is running, including if it appears randomly, then take action with the taskkill command if it is. Again, you can use Task Scheduler to run a batch containing all the commands, repeatedly. Not sure if that helps. Also it doesn't cater to running the task on demand.
      My Computer


  7. Posts : 234
    Windows 10
    Thread Starter
       #7

    Appreciate your suggestions, Kanata. Thanks.
      My Computers


  8. Posts : 42,955
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #8

    borgus said:
    Appreciate the suggestion. I use a .bat file here to do essentially what you describe, but my aim is to automate the process - no user intervention. A specified process opens; it spots and kills it. Closest that I have seen is an app that claims to do this on a schedule.
    As I said, a trivial Autohotkey script - a permanent loop
    loop {
    If process exists - kill it
    sleep n
    }

    (very roughly)
      My Computers


  9. Posts : 42,955
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #9

    Or how about a couple of alternative approaches:
    a. Registry/group policy:
    How to Block an Application or .EXE from Running in Windows

    b. or use your firewall (some firewalls allow you to block processes from running)
      My Computers


  10. Posts : 234
    Windows 10
    Thread Starter
       #10

    Auto-kill a process (firewall block result)


    Good thoughts Dalchina. Don't want to block the app, just the process that randomly starts when the app isn't in use, so "a" won't do the job.

    "b" seems promising. After more extensive searching, I find that this store app DOES have an executable.

    Nonetheless, firewall blocking did not discourage CALCULATOR.EXE from popping up in Task Manager. Good try though. ^_^
    Last edited by borgus; 20 Oct 2015 at 22:03. Reason: New info
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:56.
Find Us




Windows 10 Forums