I need to run a video file through command prompt enabling "repeat"...
Could some one please help me.. ASAP
Thanks in Advance!!

Moderator: DosItHelp
Code: Select all
@echo off
set "n=15"
::n is the number of times you want the video to loop
::if program = 30mins of lenght and video = 2mins, then n should be 15
for /l %%n in (1 1 %n%) do (
start "" "mpc hc.exe" "video file.avi"
>nul ping -n 121 localhost
taskkill /f /im "mpc hc.exe"
)
Code: Select all
@echo off
:video
start /min play_video.bat
if not %errorlevel% == 0 goto video
:YourCode
::your code here
rajeev wrote:But, the real problem is there will be multiple windows opened and there might be a delay in opening
file due to the other vbscript running in the background..
Code: Select all
:: turn on loop mode
reg add "HKCU\Software\Microsoft\MediaPlayer\Preferences" /v "ModeLoop" /t REG_DWORD /d 1 /f
:: turn off loop mode
reg add "HKCU\Software\Microsoft\MediaPlayer\Preferences" /v "ModeLoop" /t REG_DWORD /d 0 /f
aGerman wrote:There is no command line option to enable the loop mode for WMPlayer. The only possibility is to change the registry setting before you run it.
Tested on my Win7 (x86) with WMP version 12:Code: Select all
:: turn on loop mode
reg add "HKCU\Software\Microsoft\MediaPlayer\Preferences" /v "ModeLoop" /t REG_DWORD /d 1 /f
:: turn off loop mode
reg add "HKCU\Software\Microsoft\MediaPlayer\Preferences" /v "ModeLoop" /t REG_DWORD /d 0 /f
Of course that has no effect if the WMP is already running.
Regards
aGerman