No worries, well done for finding it ?
You might be interested in the AutoHotKey code below. It should be called from WMC and it'll handle ensuring that you return to WMC after you've finished with BigBox. In addition, it'll automatically close BigBox when it spots that WMC is now back in the foreground.
Save it as (say) "launch_bigbox.ahk", compile it to "launch_bigbox.exe" and put that somewhere which can be launched without invoking UAC. Make sure that your "run=" line within "Bigbox.xml" points to this executable.
Finally, bear in mind that I have Launchbox installed in "D:\Games\Launchbox" and you probably won't.
#Persistent
; Check if Big Box is running, if not then launch it
IfWinNotExist, LaunchBox Big Box
{
Run D:\Games\LaunchBox\BigBox.exe, , ,bbPID
Sleep 2000
; Kill WMC to free up resources
Process,Close,ehshell.exe
Sleep 13000
}
else ; Else activate it and bring it to the foreground
{
WinActivate
WinRestore
WinMaximize
}
; Set a timer to check every 2 seconds on the state of play
SetTimer, CheckProgram, 2000
return
CheckProgram:
; If Big Box isn't running any more, start WMC
IfWinNotExist, LaunchBox Big Box
{
Restart_WMC()
ExitApp
}
; If WMC is now active, close Big Box
WinGetActiveTitle, NowActive
If (NowActive = "Windows Media Center")
{
Process,Close,%bbPID%
Restart_WMC()
ExitApp
}
return
Restart_WMC()
{
; If WMC is already running, maximize it
IfWinExist, ahk_class eHome Render Window
{
WinActivate
WinMaximize
}
else ; Restart it
{
Run, C:\Windows\ehome\ehshell.exe /nostartupanimation,,Max
Sleep 2000
WinActivate
WinMaximize
}
ExitApp
}
Shout if you get stuck.