Go Back   TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Batch file execution problem

Windows XP Support


Reply
 
Thread Tools Search this Thread
  #1  
Old 23-03-2012
hwp hwp is offline
Member
 
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"

Reply With Quote
  #2  
Old 23-03-2012
hwp hwp is offline
Member
 
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?
Reply With Quote
  #3  
Old 23-03-2012
hwp hwp is offline
Member
 
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
Reply With Quote
  #4  
Old 02-04-2012
Member
 
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
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Batch file execution problem"
Thread Thread Starter Forum Replies Last Post
Backup Batch File Problem columbo1977 Software Development 1 08-10-2010 03:47 AM
Windows Batch file to output directory names and size to txt file m2thearkus Software Development 6 16-07-2010 12:04 AM
Execution error in exe file D_chapple Operating Systems 3 09-12-2009 12:04 PM
Dos batch file to sort files based on file names. Jon Osborn Windows Server Help 9 17-06-2009 11:06 AM
Batch file to copy a file from the local drive to a computer on lan? dudelearn Tips & Tweaks 3 12-03-2009 12:56 PM


All times are GMT +5.5. The time now is 11:32 PM.