Windows Server 2003 Batch File

Latest post 01-31-2005 5:06 PM by srussking. 5 replies.

Windows Server 2003 Batch File

12-14-2004 9:31 AM

Hi, I'm trying to make a batch file run each time I reboot my Windows 2003/IIS6 webserver. I administer the server remotely. I've been successful making the file run through sysedit/autoexec.bat, when in various startup directories, and even from the registry--the only hitch is it ONLY works when I log on remotely! Not when I reboot the server, like I want it to. Does anyone know what I need to do to make this work correctly? Thank you for any help.

RE: Windows Server 2003 Batch File

12-14-2004 10:41 AM

Nevermind, I think I've got it. Anyway, it worked for me so far....I just made it a scheduled task to run when the machine is started. And it still works even if I log on and off remotely. =)

RE: Windows Server 2003 Batch File

12-14-2004 9:14 PM

Thanks for sharing how you did it -- I've often been frustrated at not knowing how to get something to run at startup. I never thought to check scheduled tasks... I'll have to see if they have a "shutdown" option as well.

RE: Windows Server 2003 Batch File

12-15-2004 8:00 AM

You're welcome. It seems to have done the trick for me. I was trying all these other options (startup folders, autoexec.bat, the registry), then I thought why not try that? And the solution was the easiest thing possible to implement. I don't remember if I saw the shutdown option, but I think it may have been there.

RE: Windows Server 2003 Batch File

01-26-2005 3:01 AM

Hi I'm tring to reboot 2003 servers using WMI script. I need the script to point to a text file listing the servers to be rebooted.

Thanks,

RE: Windows Server 2003 Batch File

01-31-2005 5:06 PM

Group policy is really the way that MS wants you to do this. They have Startup, shutdown, log on and log off scripts. Good fun. But using
scheduled tasks for this purpose is a new one on me. Thanks for the info.

There is a good article here re: group policy scripting http://www.serverwatch.com/tutorials/article.php/1474241

-Russ
---------------------------------------
Russ King
Technology Consultant
NPower Los Angeles
A Program of the Center for Nonprofit Management
606 S. Olive Street
Suite 2450
Los Angeles, CA 90014
Tel: 213.623.7080 Ext. 23
Fax: 213.623.7460
http://www.cnmsocal.org