Script that opens Video file

I would like to have a BAT file or VBscript file that opens video file and Run it every hour for 8 hours.

I mean the video will be run at 8am , then at 9 am and so on till 4 pm and that's it.

Thank you
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewIT / Software Engineering ConsultantCommented:
Easiest way to do this is with Windows Task Scheduler.  Just create a job there that runs hourly, starting at 8:00 and only runs 8 times.

The command in the job can just be the name of the video file, it should open it with the default player configured in Windows.

Let us know if you need more help with Task Scheduler.

jskfanAuthor Commented:
I browsed to video file in the task scheduler but did not run...
There should be a command that will run the video ?
jskfanAuthor Commented:
by the way it is .mp4 file
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Bill PrewIT / Software Engineering ConsultantCommented:
How do you view the video normally, without Task Scheduler?

jskfanAuthor Commented:
I view it with VLC media player
Bill PrewIT / Software Engineering ConsultantCommented:
Okay, that has a comment line interface, so should work.

You will need to locate the vlc.exe executable file, like in program files area.  Once you determine that, you can use that as the program to execute from Task Scheduler, and then pass it a command line parameter of the full path to the video file.  If either the vlc.exe path, or the video path contain spaces you may need to surround each of those with double quotes.

jskfanAuthor Commented:
For simplicity sake..I am going to run the video in different computer where VLC player install may  not be this case how can I make the video  run from the built-in windows media player ?
Bill PrewIT / Software Engineering ConsultantCommented:
Same idea as I mentioned for VLC above.  Locate windows media player EXE file - typically in either of these two locations for recent builds of Windows, depending on 32bit versus 64bit:

C:\Program Files (x86)\Windows Media Player\wmplayer.exe
C:\Program Files\Windows Media Player\wmplayer.exe

Then in Task Scheduler build the command line to represent:

"C:\Program Files (x86)\Windows Media Player\wmplayer.exe" "Z:\folder\filename.wma"


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mauro CazabonnetSenior .NET Software EngineerCommented:
Powershell timer

#Unregister-Event -SubscriptionId 6

$Timer = New-Object Timers.Timer
$Timer.Interval = 20000
$Timer.Enabled = $True
Register-ObjectEvent -InputObject $timer -EventName Elapsed -SourceIdentifier WmPlayer  -Action {c:\test\small.mp4}

Open in new window

jskfanAuthor Commented:
Bill Prew approach is easier and it already works..I just wanted the video to run in maximized mode.
jskfanAuthor Commented:
Ok Figured it out. just added /fullscreen after this :"Z:\folder\filename.wma" /fullscreen
jskfanAuthor Commented:
Bill PrewIT / Software Engineering ConsultantCommented:
Thanks, glad that was helpful.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.