Startup order

  • Thread starter Thread starter Kathy
  • Start date Start date
K

Kathy

Hello,
I have a few small batch files I want to run at a
startup. My problem is that I need one to be run before
the other. Of course the one that I need to run first
does not. Is they a way to force (using windows startup)
one task to run before another?

Thanks in advance
Kathy
 
WININIT.INI is used during upgrades/patches/fixes/etc to have things done
before Windows starts. I'm guessing but I would think you could put your
batch files in it so they would run.

You could also check out Windows Scripting to see if that would work to
replace the batch files.
 
Yes.

Items in 10 and 11 execute alphanumerically. You can change the order in 10
and 11 by moving the items from 11 to 10. Also, you can rename the
shortcuts in 10 and/or 11.

For example; dfg.bat, and fgh.bat would start in that order. To change the
order rename to aghj.bat and bdfg.bat. They would then start in that order.

Execution Order for starting programs

With Windows XP Home, There are 13 places that programs can start from and
they are executed in the following order:

Before Logon
1)
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
2) HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices

After Logon
3)
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup
4) HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
5) HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
6) WIN.INI [Windows] Load
7) WIN.INI [Windows] Run
8) HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
9) HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
10) C:\Documents and Settings\All Users\Start Menu\Programs\Startup
11) C:\Documents and Settings\Your Name Here\Start Menu\Programs\Startup
12) HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
13) As a Scheduled Task set to run at startup.

[[Startups in groups 6 to 11 all run at the same time (more or less).
However, the groups themselves are triggered in the order shown above. In
other words, the next group can begin launching while the previous group is
still loading its startups. Due to timing issues it is impossible to say
what order these items will finish loading, thus it is impossible to
predict the exact order of execution for individual startups. For instance,
you may notice two or more system tray icons changing position with each
boot - even when no changes have been made to the order.]]

[[The order of items within a group is not necessarily the final order, as
some programs take longer than others to load, and synchronous groups can
overlap each other.]]
 
What you want to do is define them as "Startup" scripts and then use
gpedit.msc to define how you want them to run.
Since you state Startup, I'm assuming you mean, when the machine starts, not
when the user logs on.
Going by that assumption here's what you can do.
Start, Run, gpedit.msc, enter
Click, Computer configuration, Windows Settings, Scripts, double-click
Startup (right hand side), Add and browse to select your scripts.
Do this for every script you want executed.
Now, just for the fun of it and to see where to go, Open Administrative
Templates, Sytem, Scripts and you will see some entries stating something
about running scripts.
You'll see, that "Startup" scripts (the ones executed *before* a user logs
on) are, per default, executed *asynchronously*, meaning they are executed
in the order listed when you added them (see before; you can put them in
order there by move up/down).

hth
 
Back
Top