0

So I tried exit and I tried putting a 2 second delay before exit but neither worked. After the bat file successfully runs, the CMD window will stay on. I did notice however that a CMD window pops up and disappears right away and then the empty CMD window just stays there. (It's like there are two CMD windows)

@echo off cd C:\Program Files\obs-studio\bin\64bit "C:\Program Files\obs-studio\bin\64bit\obs64.exe" --collection Replay, --profile Replay, --scene Scene, --startreplaybuffer --minimize-to-tray exit 

EDIT: Also removing the cd line doesn't make the batch file work. I'm not sure why.

1
  • Not a solution but use cd /D rather than cd... Commented Jul 2, 2019 at 8:45

1 Answer 1

2

The window doesn't close because calling an app directly will tell the batch execution to wait for the app to close before running the next line. Use Start instead. So your batch will be :

@echo off cd C:\Program Files\obs-studio\bin\64bit start "" "C:\Program Files\obs-studio\bin\64bit\obs64.exe" --collection Replay, --profile Replay, --scene Scene, --startreplaybuffer --minimize-to-tray 

The exit is superfluous since after the end line it should close anyway. By the way if you're just looking to create something to click/call for launching OB studio with those parameters, using shortcut should be enough (put C:\Program Files\obs-studio\bin\64bit on Start In and write the whole command and parameters on Target)

Sign up to request clarification or add additional context in comments.

1 Comment

For some reason I couldn't get it to work when I tried putting the parameter on Target. Your method worked tho so thanks :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.