home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My Emulators
Feature Request: Restart MP after Exiting Game
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="KwizatZ" data-source="post: 948792" data-attributes="member: 106444"><p>You can make a .bat file to launch game, loop while game exe is running, then restart MP when exe process isn't found anymore.</p><p> </p><p>Something like this (replace fifa path, exe and process with the good ones, as I don't have the game, it's just random names):</p><p>[CODE]rem launch game</p><p> </p><p>"D:\Jeux\FIFA13\fifa13.exe"</p><p> </p><p>rem loop while fifa is running</p><p> </p><p>:loop</p><p>CLS</p><p> </p><p>set errorlevel=</p><p> </p><p>tasklist /fi "imagename eq fifa13.exe" | find /i "fifa13.exe"> NUL</p><p> </p><p>if /i %errorlevel% GTR 0 goto yes</p><p> </p><p>ECHO fifa13.exe is working!</p><p>timeout /t 5</p><p>GOTO loop</p><p> </p><p>:yes</p><p> </p><p>rem restart mediaportal here</p><p>taskkill /T /F /IM MediaPortal.exe</p><p>"C:\Program Files (x86)\Team MediaPortal\MediaPortal\MediaPortal.exe"[/CODE]</p><p> </p><p>If fifa uses a game launcher, you have to put a second loop for it, like I did in code samples here:</p><p><a href="https://forum.team-mediaportal.com/threads/guide-to-solve-launchers-bat-problems-for-mp-staying-disabled.115030/" target="_blank">https://forum.team-mediaportal.com/threads/guide-to-solve-launchers-bat-problems-for-mp-staying-disabled.115030/</a></p></blockquote><p></p>
[QUOTE="KwizatZ, post: 948792, member: 106444"] You can make a .bat file to launch game, loop while game exe is running, then restart MP when exe process isn't found anymore. Something like this (replace fifa path, exe and process with the good ones, as I don't have the game, it's just random names): [CODE]rem launch game "D:\Jeux\FIFA13\fifa13.exe" rem loop while fifa is running :loop CLS set errorlevel= tasklist /fi "imagename eq fifa13.exe" | find /i "fifa13.exe"> NUL if /i %errorlevel% GTR 0 goto yes ECHO fifa13.exe is working! timeout /t 5 GOTO loop :yes rem restart mediaportal here taskkill /T /F /IM MediaPortal.exe "C:\Program Files (x86)\Team MediaPortal\MediaPortal\MediaPortal.exe"[/CODE] If fifa uses a game launcher, you have to put a second loop for it, like I did in code samples here: [url]https://forum.team-mediaportal.com/threads/guide-to-solve-launchers-bat-problems-for-mp-staying-disabled.115030/[/url] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My Emulators
Feature Request: Restart MP after Exiting Game
Contact us
RSS
Top
Bottom