Retro Arcader Posted November 4, 2020 Share Posted November 4, 2020 Hey Guys, Just a quick question. Is it possible to run a windows batch file after exiting bigbox? The reason is that my PC is running 2 monitors. one of which is inside my arcade cab. I have a batch file that currently does the following... Switches audio output to Arcade Cabinet Switches HDMI out to Monitor in Arcade Cabinet Launches OBS minimized. I know bigbox can do this but I like to launch OBS before starting Bigbox. Launch BigBox ideally I want the script to then... Wait for BigBox to exit change audio back to main display monitor change HDMI back to extended desktop display. The very untidy version of the script is below... so basically I either need this script to wait for bigbox to exit OR at least run another script as it closes that performs 6 and 7. Any help greatly appreciated. @echo off echo changing outputs rem nircmd setdefaultsounddevice "3 - 2369M" 1 rem C:\Windows\System32\DisplaySwitch.exe /internal echo starting OBS cd "C:\Program Files\obs-studio\bin\64bit\" start /min obs64.exe d: cd "D:\My Games\Launchbox" start /WAIT bigbox.exe echo restoring system nircmd setdefaultsounddevice "4 - LG TV" 1 C:\Windows\System32\DisplaySwitch.exe /extend Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted November 4, 2020 Share Posted November 4, 2020 I think the method you're using is spot on. However I may be biased as that's exactly how it do it. I have my cab connected to my TV (actually to the AVR, then TV) via HDMI. [The cab monitor connects uses the DVI port on the video card] I used a program called MonitorSwitcher (found on SourceForge [it's free]) to create my [custom] different monitor configurations, and then load those from a batch file. The configs used here are "cab-only" (single monitor, only using the cab's monitor) and "TV-Primary" (dual monitor, with the TV as the primary monitor). @echo off f: cd "F:\Monitor Switcher" start /w "" "MonitorSwitcher.exe" -load:TV-Primary.xml cd "F:\LaunchBox\core" start /w "" BigBox.exe cd "F:\Monitor Switcher" start "" "MonitorSwitcher.exe" -load:cab-only.xml You'll note here, I start BigBox from the ../Core/ directory. Reason being... running F:\LaunchBox\BigBox.exe will actually start - exit - then start F:\LaunchBox\Core\BigBox.exe . So you can imagine what that does to the "start /w" in the batch file. Also note the double double-quotes after "start /w". Off hand I forget the what's-and-why-for's they're there. But (without looking it up) I'm sure it's for a good reason. And because it uses the HDMI to the TV (primary), the audio it automatically redirected. Love the use of "DisplaySwitch". I was not aware of that 'command line' option. Thank you. The problem I have with that is the HDMI port on my video card takes to spot of Monitor 1. So not sure how that would work. 1 Quote Link to comment Share on other sites More sharing options...
Retro Arcader Posted November 4, 2020 Author Share Posted November 4, 2020 @JoeViking245 Amazing! It looks like the core folder was the issue. Now working great. Thank you so much! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.