Here's an untested example.
It works by accepting the name of the game iso as an input parameter, e.g. "C:\MyGames\Game1\game1.iso", (could be dragged and dropped onto the script).
@Echo Off
Set "VDX=%ProgramFiles%\RES Software\VDX Engine\VDX_x64.exe"
Set "EMU=%SystemDrive%\Emulators\Sony\pcsx2-v1.3.1\"
Set "EXE=pcsx2.exe"
Start "" "%VDX%"
Start "" "%EMU%%EXE%" --nogui --fullscreen "%~1"
:Loop
Timeout 30 /NoBreak>Nul
QProcess|FindStr/IRC:"\<%EXE%\>">Nul&&(GoTo Loop
)||TaskKill/T /F /IM "%EXE%">Nul
Please feel free to alter the paths as necessary in the Set
statements, (making sure to leave the closing doublequote).
I decided to perform the check every 30 seconds, if you wish to change that then replace 30
in Timeout 30
to your preference. If you are using Windows XP which doesn't have Timeout
replace Timeout 30
with Ping -n 30 0.0.0.0>Nul
You may also optionally or if necessary replace QProcess
with TaskList/NH /FI "IMAGENAME eq %EXE%"