I’ve been working with Windows Sever 2008 and 2008 R2 only for a couple of months now. Generally the OS is greatly improved over 2003. There are many quirks that are frustrating though. They are generally little things, but there is nearly zero documentation and only extensive web searches reveal the fix.
One issue I’ve been struggling with is the Task Scheduler not working on what I had assumed were basic tasks. I have a script that I run to clean out files of a certain age from a specified folder. I use it for deleting log files and some backups etc. The task simply executes a batch file which calls a .vbs script. The task was failing with error code 0x1 without any farther details. After some time spent searching and trying different things I found the trick that worked.
When running a batch file at least, it seems that when setting up a task you cannot just specify the file to be run, you also have to specify the ‘start in’ parameter. For example if you specify c:\temp\script.bat you also have to specify c:\temp as the start in parameter. I did this and my task is now working like a charm!