P
P
Pavel2021-03-13 09:51:30
Windows
Pavel, 2021-03-13 09:51:30

What is the way to close a program when opening another one?

when you open a program such as Notepad.exe, you need to close chrome.exe
how to do it in invisible mode and so that antiviruses do not go crazy?

I looked in the direction of the shortcut parameters, but everything is remarkable there, then I thought cmd / bat / vbs, but antiviruses swear at any sneeze, installing third-party software is not at all an option,

tell me?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yan, 2021-03-13
@mrusklon

.cmd

@echo off
taskkill /f /im chrome.exe
start notepad.exe
exit

you create a task in the scheduler,
create a second cmd to start the task
schtasks /Run /TN "имя задачи"
- I do not recommend the second one
. for a hidden task, you will have to run from SYSTEM

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question