I'm looking for a way of running a batch script once (and only once) on boot before the Windows XP Logon prompt appears on screen.
What is the easiest way to do this?
Also, I need to be able to run this command before the network has started (or if the network has failed to start).
Use a computer start up script.
You can do this using either local policy editor (standalone PC or on a domain) or group policy editor (on a domain only.)
Navigate to this settings via
Computer Settings > Windows Settings > Scripts > Startup
The script will run as the local system account
If you only want the script to run once, then you will need to manually set flag at the completion of the script and check it at the start (otherwise the script will run every time you start the computer until you take it out of the policy).
The easiest way is to either create an empty text file in a known location and check for its presence. Alternativly you can use the 'reg query' and 'reg add' commands in the batch file to set the flag in the registry.