So, I'm trying to make my life a little easier by creating a batch file that will kill a particular process when I use a special command. Here is how it goes:
SET NAME = %1
IF NOT DEFINED NAME SET NAME = "firefox*"
SET fullcommandarg = "IMAGENAME eq " and NAME
TASKKILL /FI %fullcommandarg% /F
But I get an error that FI needs an argument. I'm not trying to learn how batch files work but I would like to know what I'm doing wrong here and also what the possible solution would be. Since Firefox is usually the application I close using this command I set it as default. How can I get this to work? Thanks in advance. P.S: Only comment here if you actually want to help. If you're going to tell me to go read a book or something snarky like that, I'll repeat that I'm not trying to learn more about batch files than is necessary for me. To those who actually want to help, reference links are welcome in case the explanation is too long or if you don't have the time to type it down or something.