How do I run wmv file on pc with vbscript?

Asked By 30 points N/A Posted on -
qa-featured

How do I run wmv file on PC with vbscript?  I would like to create a wmv playlist in the script then have it automatically shut down the PC when it completes.  My desktop runs on Windows XP 64 bit.  Thanks in advance.

SHARE
Answered By 10 points N/A #137068

How do I run wmv file on pc with vbscript?

qa-featured

Greetings Sharipcheney!

Here's how to create a vbscript to run a playlist and then shutdown the computer.

First the code to run the playlist in your computer.

Here's the code:

set shell = Wscript.createobject("wscript.Shell")
shell.run "wmplayer /playlist xps", 7, False    
wscript.Sleep 5000    
success = shell.appactivate("Windows Media Player")
if success then shell.sendkeys "% n

This code is use to play the playlist in windows media player.

Now you will add the code to shutdown the computer.

Shell.run "shutdown -s -t 0 -f -m \" & "."'

Visit this link for some example.

Best Regards,

Jose D Dunn

Related Questions