(2012-04-08, 22:57)pyrodex Wrote: Question:
I used to use WMC for my TV Video along with XBMC. WMC was launched from a batch file through the use of Advance Launcher. Recently I switched to the AE Windows build to help with testing and this build uses Exclusive audio mode. I can't run XBMC and WMC at the same time as before since WMC wants the audio and XBMC has it locked. In my WMC.bat file I added a line to use taskkill (windows 7) to kill XBMC and start WMC afterwards since I have a button on my remote to restart XBMC incase of any crashes. Seems my batch file doesn't have enough delay from XBMC shutdown to WMC since I still get audio locks. Could anyone assist in a good way via batch to shutdown XBMC completely and then start up WMC in a timely manner so I can watch livetv without the dreaded Video Error from XBMC.
If you want to check the XBMC statut before starting WMC, I strongly suggest you to create a small Autoit script which have iinternal function for that. First after AutoIt is installed you need first to create an Autoit script(named
launcher-wmc.au3 for example) similar to this one :
Code:
ProcessClose("xbmc.exe")
ProcessWaitClose("xbmc.exe")
Run ("C:\Windows\ehome\ehshell.exe","")
When your script is created, save it as
launcher-wmc.au3. Right-click on it and select the Compile script option. AutoIt will automatically create an executable file (
launcher-wmc.exe) corresponding to your script. Copy this executable file into the same directory than the WMC application file. Now you can modify your WMC launcher into advanced launcher using
C:\Windows\ehome\launcher-wmc.exe instead of
C:\Windows\ehome\ehshell.exe as application.
If you want to restart XBMC automatically after WMC was closed, the script will become :
Code:
ProcessClose("xbmc.exe")
ProcessWaitClose("xbmc.exe")
Run ("C:\Windows\ehome\ehshell.exe","")
ProcessWaitClose("ehshell.exe")
Run ('"C:\Program Files (x86)\XBMC\XBMC.exe"',"")