PDA

View Full Version : Controlling the order of things in the startup group?


Feek
25-01-2007, 09:51
I want to control the order in which things start on my Windows 2000 server, preferably introducing a delay in between them.

Anyone know of a tool to do this?

Daz
25-01-2007, 11:06
Services or applications (in startup or the run registry key)?

Services you can sort by playing with the dependencies (there are 'runlevel' equivalents but only a small number and I dont think there's any way to specify an order within a runlevel), not sure about the others.

[edit]
If it's startup entries, then instead dump a batch/vbscript script in there to start the programs one by one.

If they're in run, then I'm not sure :/

Feek
25-01-2007, 11:25
Applications, I don't care about services.

I guess I could do it with a batch file, but I need some timed pause command which isn't there by default.

iCraig
25-01-2007, 11:27
Batch file sounds best.

Why do you need a pause? If the programs get started in a certain order, won't they all eventually be opened in the same order?

Daz
25-01-2007, 11:28
'sleep' should be :) sleep 5 will wait 5 seconds.

Execute each command prefixed with start (start C:\windows\notepad.exe), gives you some more options if you want them (/wait will pause the script until that command terminates, /min for minimized, /max for maximised etc).

REM Start notepad
start /max notepad
REM Wait 5 seconds
sleep 5
REM Shutdown the box in 30 seconds
shutdown -s -f -t 20
etc etc

Daz
25-01-2007, 11:29
Why do you need a pause? If the programs get started in a certain order, won't they all eventually be opened in the same order?
Depends how it's started, the Windows shell isnt very clever. Which is why I suggested using 'start', so you have some control over it :)

Feek
25-01-2007, 11:32
Erm, since when was 'sleep' a valid command in dos or windows? :p

Craig, yes, they will start in the order I want without a pause, but there a couple I want to finish loading and settle down before the next load...

Daz
25-01-2007, 11:41
LOL, sorry, I have UnxUtils in path on all my Windows boxes, sometimes I forget it ;D

Here you go:

Feek
25-01-2007, 14:08
Ta :)