Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a scheduled task that calls a bat file, problem is it does this in c:\windows\system32 instead of the path it exists in (c:\bak), is there a setting that I can change to set it to run in the correct location?

share|improve this question
    
Just a thought, but perhaps you should simply add a command at the start of the script to set the correct working directory and other environment settings? Scripts that don't work every time can drive someone else trying to fix your script insane if they don't know what the environment should be like. –  Zoredache Oct 8 '10 at 6:19

1 Answer 1

up vote 1 down vote accepted

Yes - in the "Edit Action" UI, fill out the Start In (Optional) field.

(If you aren't already, use the Task Scheduler to create your scheduled task.)

share|improve this answer
    
Ah found it, thanks very much Mark. –  Beuy Oct 8 '10 at 4:11
    
@Beuy - my pleasure, I've got several tasks set up and have had to deal with the differences between this incarnation of task scheduling and previous ones. :) –  Mark Allen Oct 9 '10 at 1:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.