Borrowed from this : SuperUser.com
Answer.
I'll put it here for
convenience & "archive" purposes, also adjusted for your Question.
Make sure .avi format is set to always "Open With" Windows Media Player.
1) Open a basic text editor (ie: Notepad) and paste the code shown further below.
2). Save it as PlayVids.cmd (or whatever you like but it must be saved as .cmd)
3) Double click the .cmd file to auto-open all files in folder at once. This gives you an auto-playlist.
Code for pasting into cmd file :
(replace C:\MyVideos
with your own Disc's drive + folder. If path is wrong it will fail/close)
@ECHO OFF
SET VIDFolder=C:\MyVideos
SET TempVBSFile=%tmp%\~tmpVIDTemp.vbs
:VBSDynamicBuild
IF EXIST "%TempVBSFile%" DEL /F /Q "%TempVBSFile%"
ECHO Set WshShell = WScript.CreateObject("WScript.Shell") >>"%TempVBSFile%"
ECHO WshShell.Run "%VIDFolder%" >>"%TempVBSFile%"
ECHO Wscript.Sleep 500 >>"%TempVBSFile%"
ECHO WshShell.SendKeys "^a" >>"%TempVBSFile%"
ECHO Wscript.Sleep 500 >>"%TempVBSFile%"
ECHO WshShell.SendKeys "{ENTER}" >>"%TempVBSFile%"
CSCRIPT //nologo "%TempVBSFile%"
GOTO EOF