Windows Task Scheduler with a batch file

jonin

New Member
Hi folks,

I have created a simple batch file for 3 songs to be played with wmp. See below:

"C:\Program Files (x86)\Windows Media Player\wmplayer.exe" -open "D:\Stuff\Music\Playlists\Music.wpl" -start
exit

When I click on the bat file icon it runs as intended: wmp opens up and moves through the play list... if I wish to stop the application I can simply close wmp and hey presto... no more music.

I then experimented using the task scheduler with this bat file with the idea of using my computer for an alarm clock. I have been playing around with it with the intention of being able to put my comp into hibernation mode and then have it wake and execute my play list at a given time.

The first problem I encountered was that my comp was waking from hibernation but couldn't automatically launch the bat file as the default vista security feature requests the user to re-enter his password at the log on screen. I got round this issue by switching this security feature off but if possible I would like to know if there is any script I could add to my bat file which could automatically re-enter my password upon wake up so I can keep this default security feature switched on????

My second question concerns the means by which the task schedule seems to be operating when it wakes up from hibernation... unlike from when I manually click the bat file icon, no wmp appears to be getting launched yet sure enough my comp is playing the music play list in my bat file. What is really confusing me is that I don't understand where the music is coming from. WMP is closed, and when I look in the task manager there are no applications running. Consequently this also means I have no means to skip, pause/ stop etc this seemingly now ghostly playlist... i.e. for the music to stop it has to play all songs in the play list or I have to restart/log off.

Is this nuts or does this make plane sense to anyone?

Any help/insight/input regarding these two questions much appreciated.
 

My Computer

System One

  • Manufacturer/Model
    Dell XPS 1710 Notebook
    CPU
    Intel Core 2 CPU T7600 @ 2.3 GHz
    Memory
    2046 MB RAM
    Graphics Card(s)
    NVidia GeForce Go 7900 GTX
    Sound Card
    SigmaTel High
    Screen Resolution
    1920 x 1200
    Hard Drives
    dell 200GB SATA hard drive 7200 rpm
Hello jonin, welcome to Vista forums!

Have a look at this Task Scheduler tutorial; to see if it provides a solution for you!

Keep us informed!













Later :shock: Ted
 

My Computer

System One

  • Manufacturer/Model
    * BFK Customs *
    CPU
    Intel C2Q 9550 Yorkfield
    Motherboard
    ASUS P5Q Pro
    Memory
    8GB Dominator 8500C5D
    Graphics Card(s)
    XFX ATI 1GB 4870 XXX
    Sound Card
    Realtek HD 7-1
    Monitor(s) Displays
    1x 47" LCD HDMI & 2x 26" LCD HDMI
    Screen Resolution
    1920x1080P & 1920x1200
    Hard Drives
    2x 500GB 7200RPM 32MB Cache WD Caviar Black
    PSU
    Corsair 620HX
    Case
    CM Cosmos RC-1000
    Cooling
    Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
    Keyboard
    HP Enhansed Multimedia
    Mouse
    Razer Diamondback 3G
    Internet Speed
    18.6Mb/s
    Other Info
    My First Build ;)
oh in response to my second question, I forgot to mention that I thought the solution was to go back into the task scheduler and end this running task. Despite it being terminated however, the music keeps on playing. I also tried the disable command and even deleting the task but still to no avail.

Thanks Ted, much appreciated. I will have a look at the tutorial and will keep all informed if I have any luck. In the mean time though I would still be keen to hear from anybody who can offer me some practical advice or who have encountered this problem themselves first hand. Sending me links is handy but I have all ready scoured google for solutions to the point I'm about to give up. So if this tutorial does not hold the secret answer to these problems... please experts step up and share the know how ;)
 

My Computer

System One

  • Manufacturer/Model
    Dell XPS 1710 Notebook
    CPU
    Intel Core 2 CPU T7600 @ 2.3 GHz
    Memory
    2046 MB RAM
    Graphics Card(s)
    NVidia GeForce Go 7900 GTX
    Sound Card
    SigmaTel High
    Screen Resolution
    1920 x 1200
    Hard Drives
    dell 200GB SATA hard drive 7200 rpm
Hi jonin,

the task scheduler is running the batch file not the Windows media player so when the scheduled task finishes the WMP task continues, you may want to enter the command line you have in the batch file directly into the scheduler. and see if that gives you more control.
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro x64 Latest Release Preview
    Monitor(s) Displays
    Acer G276HL 27", (DVi) + Samsung 39" HDTV (HDMI)
    Screen Resolution
    2 x 1920x1080 @50Hz
  • Manufacturer/Model
    Real World Computers (Custom by Me)
    CPU
    AMD FX8350 Vishera 8 Core @4GHz
    Motherboard
    Asus M5A78L-M USB3
    Memory
    32GB [4x8GB] DDR3 1600 MHz
    Graphics card(s)
    Asus nVidia GTX750TI-OC-2GD5 (2GB DDR5)
    Sound Card
    ASUS Xoner DG + SPDIF to 5.1 System + HDMI
    Monitor(s) Displays
    Samsung 32" TV
    Screen Resolution
    1920 x 1080
    Hard Drives
    Internal
    Crucial CT256MX100SSD1 256GB SSD,
    Seagate ST2000DM001-1CH1 2TB,

    External (USB3)
    Seagate Backup+ Hub BK SCSI Disk 8TB
    2.5/3.5 Hot Swap Cradle, USB3 + eSata (client HDDs)
    NAS 4TB
    PSU
    Aerocool Templarius Imperator 750W 80+ Silver
    Case
    AeroCool X-Warrior Red Devil Tower
    Cooling
    Hyper103 CPU, Rear 120mm, Front 2x120mm, Side 2x120mm
    Internet Speed
    68 MB Down 18.5 MB Up
    Other Info
    Six Sensor Auto / Manual Digital cooling (Fan) control with Touch control Panel
Back
Top