I use win 7 (but on win 10 it's the same thing).
One of the goals is also to terminate processes that start on their own under certain conditions.
At this time I need to kill a particular program.
For taskkil, more than other dos commands, you need administrator rights.
Getting the rights is a problem!
For taskkill, it seems, it is not enough even to run the EXE file in administrator mode.
And to BAT file, by its nature, cannot be assigned administrator rights for execute.
So you don't get anything: neither with BAS code, nor with the EXE, nor with the BAT file.
From the command line, in a CMD window opened in administrator mode, everything works perfectly !!
But now... I think I'll amaze you!
Sometimes... only a few very rare times... for example this morning when I tried again (the PC had not been turned off) the first time - ONLY THE FIRST TIME - the EXE file, without administrator rights, terminated the program !!!
Then, nothing more. Instead, the execution is planted and does not execute the END command.
Virus? no, there are none; mystery? yes, it is Maybe ghosts...
I'm losing hope...
SHELL "C:\Windows\System32\notepad.exe"