Search code examples
windowsbatch-file

Batch force windows calculator to close in Windows 10


I have three monitors, and I like to play SMITE in triple surround. To do this the NVIDIA Control Panel wants me to close a few (to me random) applications before it can do its magic. This is all good and well, but the calculator application is a pain to close. I have to use the task manager to force the process to stop, because for some reason it doesn't always by itself.

I want to use a batch script for this, so it will close automatically with only a single double click (along with some other applications that sometimes do and sometimes don't need to be closed)

But since the calculator isn't just a simple .exe, I can't figure out how to shut it down. What I've found for a regular process is taskkill /f /im processname.exe but, the calculator doesn't have a simple .exe I can kill. The default Windows 10 apps have odd names, and are technically file folders according to their properties.

Can somebody help me with how to kill the Windows apps processes via batch (or something else if that's better)?


Solution

  • Windows Calculator's executable is located (for me) at

    C:\Program Files\WindowsApps\Microsoft.WindowsCalculator_10.1611.3123.0_x86__8wekyb3d8bbwe \calculator.exe

    that program is launched by calc.exe. You can terminate Windows Calculator with:

    taskkill /f /im calculator.exe