2012-04-13, 18:13
Actually, it is possible to replace PlayBDMV and PlayISO with a single .cmd that can play all types of files in TMT 5 (single videofiles are played too). For disks you may still need PlayDisc, but I'm not sure. My HTPC does not have a disk drive.
Here's the code:
Careful with the paths - replace them with your own.
Here's the code:
Code:
@echo off
set ext=%1
rem removing quotes (") from the path
rem it does not work with a closing quote for some reason
set ext=%ext:"=%
rem extracting a file extension from the path
set ext=%ext:~-3%
rem checking if this is an ISO file
rem if yes go to the ISO processing part
if %ext%==ISO goto iso
rem the same for lowercase "iso"
if %ext%==iso goto iso
rem if not ISO, removing "BDMV\index.bdmv" from the path and passing it to TMT 5
rem for a separate videofile (mkv/avi/m2ts etc.) the path is passed unchanged
set pth=%1
set pth=%pth:BDMV\index.bdmv=%
rem starting TMT 5
"d:\Programs\uMCEPlayer5.lnk" %pth%
goto end
:iso
rem mounting an ISO image to Daemon Tools vitual scsi drive #0
"c:\Program Files\DAEMON Tools Lite\DTLite.exe" -mount scsi, 0, %1
rem waiting...
ping -n 2 -w 1000 127.0.0.1 > nul
rem starting TMT 5
"d:\Programs\uMCEPlayer5.lnk" F:\
rem unmounting the ISO image
"c:\Program Files\DAEMON Tools Lite\DTLite.exe" -unmount scsi, 0
:end
exit
Careful with the paths - replace them with your own.