batch-filevideocd-rom

How to create a batch file to run a videodisc?


I have a CD with the following folders:

CDI
EXT
MPEGAV
PICTURES
SEGMENT
VCD

I want to make a file autorun.bat that when clicked will start the video.
How to do it?

Here are the details of each Folder's contents -

CDI CDI picture here

EXT EXT image

MPEGAV MPEGAV Picture

The rest of the folders are empty.

The folders run only 1 video. (no more updates sorry, i lost the CD.)


Solution

  • I'm going to answer this with some assumptions, knowing that you only told us about the folders on the CD and not any information where "the video" resides or what type of file "the video" even is. We don't know quite a lot that should be in the question you posted.

    1. First you need to make an autorun.inf file. You can do this in notepad, when saving change the filetype to "All files (.)", then put in your filename of "Autorun.inf".

      [autorun] open=autorun.bat

    2. Do the same thing again with notepad, only this time create an "Autorun.bat" file. In this file we need to specify which folder on the CD the video is in, and possibly which program to open the file if you need a specific application to run it that isn't a default windows application.

      @echo off cd /d "%~dp0\MPEGAV" start NameOfYourVideoHere.mp4

    In the script above %~dp0 refers to the drive that the .bat file is on.

    1. Place both autorun.inf and autorun.bat in the ROOT of your CD.

    2. Eject/Re-insert the CD and watch the magic happen.

    Note based on my assumptions:

    1. If you do not want the video to play when simply inserting the disc into the tray... do not make the autorun.inf, only the autorun.bat and then simply double click it when you want the video to play.
    2. If you need another program to play the video, you will replace start NameOfYourVideoHere.mp4 with something like start "C:\folder\path2anyvideoapplicationhere" NameOfYourVideoHere.mp4

    Lastly, next time you ask a question here, please provide more details. I'm just going out on a limb here.