T
Taed Wynnell
We're deploying a Windows Server 2003 image a bunch of times, and on the
first time it boots, we want to run a batch file (which will be slightly
different for each machine).
But I can't figure out how to get the system to run a batch file on boot...
Note that it is a batch file (not a .exe), and that I want to run it on
boot, not on user login. Ideally, the method to "install" it would not
modify the registry (since we'll be editing the image file, so editing the
registry within there would be awkward). We only need to run it once, but
if it's in some run-every-boot method, then we'd just have the batch file
rename itself at the end or somesuch.
So, I first looked at the
"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnc
e" key (even though it was in the registry), but I couldn't get it to invoke
a batch file -- perhaps it only will run .exes? I even tried prefacing it
with "cmd /c", but it just won't run it.
WINSTART.BAT seemed ideal for what I want, but I'm guessing that it isn't
supported after Win98 from what I can tell. I tried it anyway in \,
\windows, and \windows\system32, but no luck.
The Win.ini, Boot.ini, and so on don't seem suited to a batch file (or am I
wrong?).
Any other ideas?
(Thanks in advance!)
first time it boots, we want to run a batch file (which will be slightly
different for each machine).
But I can't figure out how to get the system to run a batch file on boot...
Note that it is a batch file (not a .exe), and that I want to run it on
boot, not on user login. Ideally, the method to "install" it would not
modify the registry (since we'll be editing the image file, so editing the
registry within there would be awkward). We only need to run it once, but
if it's in some run-every-boot method, then we'd just have the batch file
rename itself at the end or somesuch.
So, I first looked at the
"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnc
e" key (even though it was in the registry), but I couldn't get it to invoke
a batch file -- perhaps it only will run .exes? I even tried prefacing it
with "cmd /c", but it just won't run it.
WINSTART.BAT seemed ideal for what I want, but I'm guessing that it isn't
supported after Win98 from what I can tell. I tried it anyway in \,
\windows, and \windows\system32, but no luck.
The Win.ini, Boot.ini, and so on don't seem suited to a batch file (or am I
wrong?).
Any other ideas?
(Thanks in advance!)