Autorun.inf - Play video on startup problem

I have burned a cd and set the proprties to open with Windows media player.

On the cd I have a subdirectory "player" that has the Microsoft media player files in it.

I have seted and it works from the command line

d:\player\Mplayer2.exe /play  d:\loggingin.avi

With the following runme.bat file contents

.\player\Mplayer2.exe /play  .\loggingin.avi

I can get it working when the disc is loaded by having this Autorun.inf

[autorun]
OPEN=.\runme.bat
ICON=favicon.ico

BUT there's the DOS screen hanging around.

I just want it to work without a .bat file, or the .bat file to close once the Mplayer opens.

As people using the cd will have media player disabled on their PCs I need to supply the Media Player files on the CD.

Can someone help me do this withut the DOS window?


LVL 1
kjuliffAsked:
Who is Participating?
 
nayernaguibCommented:
You can also try the modification that I have suggested. I think that will do the job.

_______________

  Nayer Naguib
0
 
nayernaguibCommented:
You can modify the autorun.inf as follows:

  [autorun]
  OPEN=.\player\Mplayer2.exe /play  .\loggingin.avi
  ICON=favicon.ico

_______________

  Nayer Naguib
0
 
CaudaxCommented:
Also,

the batch can be modified if you change

This:
------------------------------------------------------------------------
"d:\player\Mplayer2.exe /play  d:\loggingin.avi"
------------------------------------------------------------------------

To this:
------------------------------------------------------------------------
START d:\player\Mplayer2.exe /play  d:\loggingin.avi"
------------------------------------------------------------------------

The start command will tell the batch to avoid waiting for the program to stop running.
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
SStoryCommented:
If you know the operating system isn't an old one you could try

[autorun]
  OPEN=cmd.exe /C ./runme.bat
  ICON=favicon.ico

Otherwise,

what does it do if you just set the value to

[autorun]
  OPEN=loggingin.avi
  ICON=favicon.ico

and let Windows decide how to open it?
0
 
kjuliffAuthor Commented:
It plays from the PCs media player, which I don't want.
0
 
CaudaxCommented:
Have you tried my solution to modify the batch file so the command to run the program starts with "START" so that the batch closes as soon as the program open?

Just run this line (removing the quotes):
------------------------------------------------------------------------
START d:\player\Mplayer2.exe /play  d:\loggingin.avi
------------------------------------------------------------------------
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.