2

When the server restarts, I need to kick off a process in a form of a batch file (that basically preloads a bunch of data that will be needed later).

I haven't found an effective way to do this (other than write a Windows service). Am I missing something simple?

AngryHacker
  • 2,877
  • 6
  • 28
  • 33
  • Is this for 2003, or 2008? I am almost certain the 2008 task manager can do it, not sure about 2003 though. – Zoredache Feb 23 '12 at 20:35

2 Answers2

11

You want to use a startup script for this. The link provided is for a logon script, but the process is the same for a startup script. You just configure it in Computer Policies instead.

If you don't have Group Policy available, or don't want to manage it there, the steps are the same to configure this in the Local Policy.

You'll either use the Group Policy Management Console or the local gpedit.msc to configure this policy:

enter image description here

MDMarra
  • 100,183
  • 32
  • 195
  • 326
6

If it is Windows 2008, or 2008 R2, the task Scheduler has a trigger for "At startup".

enter image description here

If an earlier version of server, you may be able to use the HKLM/Software/Microsoft/Windows/Currentversion/Run key to launch a process (not recommended)

uSlackr
  • 6,337
  • 21
  • 36