Results 1 to 4 of 4

Thread: Batch file execution problem

  1. #1
    Join Date
    Mar 2012
    Posts
    4

    Batch file execution problem

    I've created a .bat file and saved it to my desktop as "Alarm.bat" and did this as Sys Administrator w/password. I created a scheduled task to execute the file (a song) but it fails to start. I can manually run the .bat file from within the scheduled tax window and it works. When I used the dos command "c:\documents and settings\acer>alarm /?" it states 'alarm" is not recognized as a batch file. Below is the .bat text. Suggestions?
    @Echo off
    echo %date% %time% %UserName%
    cd /d c:\
    cd /d documents and settings\acer\desktop
    "james bond.mp3"

  2. #2
    Join Date
    Mar 2012
    Posts
    4

    Re: Batch file execution problem

    Update! So I realized I was using the wrong directory (minus the \desktop) in my dos command. When entering the correct directory in dos it executes the file. However, I still have the problem of it not executing in Task Scheduler. I have checked the enable box within my task but don't know what else to try. What might I be overlooking or what setting might be blocking me?

  3. #3
    Join Date
    Mar 2012
    Posts
    4

    Re: Batch file execution problem

    Solved my own problem! After tweeking so many things I'm not sure what the original problem was, but.... after looking at the task log (which I didn't know existed until I found reference to it here in the forums) I discovered the problem. I couldn't sleep so took my laptop to the kitchen (so as not to disturb my wife). Well I had my laptop running on batteries and the "do not run while on batteries" was checked. I plugged it in and the scheduler works as advertised! So its just about daylight now so I hope I can make it through Friday...bring on the weekend!! Tks to all the potential help I would have received. HWP

  4. #4
    Join Date
    Apr 2012
    Posts
    4

    Re: Batch file execution problem

    Dang, I'm too late! :p
    I would have loved to help you.
    Last edited by Fawers; 02-04-2012 at 05:50 AM. Reason: grammar, syntax

Similar Threads

  1. Backup Batch File Problem
    By columbo1977 in forum Software Development
    Replies: 1
    Last Post: 08-10-2010, 03:47 AM
  2. Windows Batch file to output directory names and size to txt file
    By m2thearkus in forum Software Development
    Replies: 6
    Last Post: 16-07-2010, 12:04 AM
  3. Execution error in exe file
    By D_chapple in forum Operating Systems
    Replies: 3
    Last Post: 09-12-2009, 12:04 PM
  4. Dos batch file to sort files based on file names.
    By Jon Osborn in forum Windows Server Help
    Replies: 9
    Last Post: 17-06-2009, 11:06 AM
  5. Replies: 3
    Last Post: 12-03-2009, 12:56 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,026,179.11767 seconds with 16 queries