1
I would like to create a batch script that safely closes OBS Studio without corrupting a streaming session. This thread discusses closing a program with TASKKILL, but when I tried it it didn't work. Their examples referenced Windows XP, is it different for Windws 10? These are the scripts I used following their example:
TASKKILL /FI "C:\Program Files (x86)\obs-studio\bin\64bit\obs64.exe"
and
TASKKILL /FI obs64.exe
A term I've seen before was called "safe" killing. Can this be done with a batch script, and if so, how?
What scenario do you have that would require you to kill it using a script? Depending on the recording format, as the options would tell you, it's important to properly stop the recording in order to not corrupt the recording. As per
taskkill /?
you would either need the PID or image name. So your second version should work to kill the task. As you're not using wildcards you could just skip the/FI
flag. – Seth – 2017-04-07T08:09:20.007I have OBS running on a separate machine, and would like to make ending my streams much easier, it's basically just going to be a shortcut to going to the other machine, and manually closing it there. I don't know what a "wildcard" is (I'm still fairly new to programming). I also don't mind if the script brings up the save work prompt. I just want a safe remote kills-witch. – Mr. Mendelli – 2017-04-07T08:28:50.277
This doesn't really have anything to do with programming. A wildcard is a placeholder. E.g. you could use
ob*
to kill all processes that match, where*
represents any number of characters. If you want to executetaskkill
remotely you will have to specify/S
and possibly/U
and/P
. Just runtaskskill /?
and look at the examples. OBS is a rather complex application it might be better to manually stop it. You could just use something like remote desktop to access the other PC. – Seth – 2017-04-07T08:33:38.343Ok, but what does
/FI
do anyways? – Mr. Mendelli – 2017-04-07T08:43:56.787taskskill /?
what don't you understand about the description? – Seth – 2017-04-07T08:57:52.887