Hossein
Hossein

Reputation: 1

A batch file to do multiple tasks

I'm new here and have a question.

How can i write a batch file to do the following multiple tasks:

  1. close program "A"
  2. open program "B" for 10 minutes
  3. close program "B"
  4. open program "A"

Thank you very much.

Upvotes: 0

Views: 426

Answers (1)

rifteyy
rifteyy

Reputation: 50

You might wanna try:

@echo off
%SystemRoot%\System32\taskkill.exe /IM A_process.exe
start B_process.exe
%SystemRoot%\System32\timeout.exe /T 600 /NOBREAK
%SystemRoot%\System32\taskkill.exe /IM B_process.exe
start A_process.exe
exit

Upvotes: 1

Related Questions