Automatically Close Programs at Specific Time

Configurare noua (How To)

Situatie

Scheduling apps for Windows 10 aren’t rare. You’ll find quite a few options are available if you’re looking to automate something but in most cases, the task scheduler will still outshine them. If you need to terminate or close, or quit an app on your Windows 10 PC at a given time, you can do so with task scheduler and a simple batch script.

Solutie

Pasi de urmat

We need to first create the batch script that will run and close the app. You can use a single script to close multiple apps but if the apps need to be closed at different times, then you need to create a different script for each app. Likewise, you will also need to create a separate task to quit each app.

Open New Document in Notepad, and add this as the first line: @echo off. Echo off basically turns off command echoing so that you don’t get any messages when running the commands in the batch file.
In the next line we will specify the programs to close. Add each program on a separate line.

The rem command is just a comment to identify the program, CD command changes the directory, and TASKKILL is a built-in utility in Windows used to kill programs and processes. /F parameter forcefully terminates programs, and /IM is used to specify the program name.

After adding all the programs you want, finish the script by adding Exit at the end. Complete script should look like this:

Save the file as a batch file with the name close.bat.

  • We’re done with our script. Now, to run the script at a specific time it has to be scheduled as a task.
  • Open Task Scheduler by entering taskschd.msc in the Run dialog.

  • When Task Scheduler opens, create a new Task, and give it a name.

  • In Triggers tab, configure the schedule you want the batch script to run at.

  • In Actions tab, browse and select close.bat file.

If you want, you can configure more settings in “Conditions” and “Settings” tab, but they are not necessary. Finally, click OK to save changes.

Tip solutie

Permanent

Voteaza

(0 din 4 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?