- Fist you assign to the variable "process_name" value "ACM.exe". Then you assign to the same variable value "Werfault.exe". As a result "ACM.exe" is being overwritten by "Werfault.exe". So if you need the value "ACM.exe" later below in the script you don't have it any more!
- The only condition in the script is: If there is %process_name% (in your case "Werfault.exe") in the tasklist then Goto lable :RUNNING. So the script repeats that loop as long "Werfault.exe" process is running.
When "Werfault.exe" process is not running anymore the script will kill "cheatengine-x86_64.exe" , "Texmod.exe" and "Texmod and Game Autolauncher.exe". It will attempt to kill "Werfault.exe" too, but it obviously doesn't exist anymore...
Now on "Werfault.exe" error the process probably doesn't exit by itself (it means the script will loop further on) and that's probably why it doesn't work.
To detect error of the "Werfault.exe" you can monitor e.g. (CPU usage, Memory usage, GPU usage, eventual messages from "Werfault.exe" if any, etc...). Actually how do you know by yourself when "Werfault.exe" has an error?