Forcing order of launch of systray programs

R

Rien

Hello

I have several programs launched at startup and shown in systray :
antivirus, firewall, etc : they are recorded in the register base.

The problem is that they are never launched in the same order. They seem
to be launched at random. When the antivirus is launched in last
position, the Windows security center warns me there is no antivirus;
it's probably because the security center is launched before the
antivirus. I don't think it's very serious, but it's annoying.

The question : How can I force the order of launch and place the
antivirus first.

My configuration : WXP SP2 Media center, Kasperski antivirus, ZoneAlarm
Pro firewall.

Thank you
 
3

3c273

You could make the Security Center service depend on your Antivirus service.
But... if you don't know what this means or how to do it, I wouldn't mess
with it.
Louis
 
W

Wesley Vogel

It's called the registry.

Execution Order for starting programs

With Windows XP, 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
or %allusersprofile%\Start Menu\Programs\Startup
11) C:\Documents and Settings\Your Name Here\Start Menu\Programs\Startup
or %userprofile%\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.]]

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.exe, fgh.exe and ghj.exe would start in that order. To
change the order rename the shortcuts to 1ghj.exe, 2dfg.exe and 3fgh.exe.
They would then start in that order.

Some items are a race every time as to which actually starts first, no
matter what you do.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
W

Wesley Vogel

I think some of those keys are Windows 9x keys only?

Why do you think that? Because whatever keys do not exist on your machine?
Which keys do you believe are 9x only?

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
John John said:
I think some of those keys are Windows 9x keys only?

John

Wesley said:
It's called the registry.

Execution Order for starting programs

With Windows XP, 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
or %allusersprofile%\Start Menu\Programs\Startup
11) C:\Documents and Settings\Your Name Here\Start Menu\Programs\Startup
or %userprofile%\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.]]

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.exe, fgh.exe and ghj.exe would start in that order. To
change the order rename the shortcuts to 1ghj.exe, 2dfg.exe and 3fgh.exe.
They would then start in that order.

Some items are a race every time as to which actually starts first, no
matter what you do.
 
J

John John

Wesley said:
Why do you think that? Because whatever keys do not exist on your machine?
Which keys do you believe are 9x only?

The RunServices keys. These are handled by the ControlSet \Services key
on NT systems.

John
 
W

Wesley Vogel

Just because NT does not use RunServices or RunServicesOnce to load
services, does not mean that those keys cannot exist and be used to load
something on NT 5.1.

INFO: Run, RunOnce, RunServices, RunServicesOnce and Startup
http://support.microsoft.com/kb/179365

Run and RunOnce Registry Keys
http://msdn2.microsoft.com/en-us/library/aa376977.aspx

You receive a "Cannot find C:\Windows\System32\System32.exe" warning message
when you start Windows XP
http://support.microsoft.com/kb/833767

A diagnostic program may immediately close and you may receive a "STOP
0x00000050" or "STOP 0x0000000A" error message in Windows Server 2003,
Windows 2000, or Windows XP
http://support.microsoft.com/kb/897079

The HaxDoor virus may cause a "STOP 0x00000050" or "STOP 0x0000008e" error
message
http://support.microsoft.com/kb/903251

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
J

John John

Typically, as shown by the list of articles that you provided, on NT
systems those keys are only used by virus. The MSDN article lists the
keys used by the different Windows versions. I have yet to see valid NT
services load from the RunServices keys, they load in the ControlSetnnn
key. The MSDN article states:

Windows NT 4.0, Windows 2000, Windows XP and Windows Server 2003 family
registry includes the following four keys:

* HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
* HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
* HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
* HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce

Windows 95/98/ME registry includes the following seven keys:

* HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
* HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
* HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
* HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
* HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices
*
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
* HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup

Anything out of line with the above with regards to NT is highly
suspicious as a valid service.

John
 
W

Wesley Vogel

Anything out of line with the above with regards to NT is highly
suspicious as a valid service.

I never said anything about loading a service. *Anything* can be loaded
from those keys; viruses, spyware, malare or a legitmate program.
Just because NT does not use RunServices or RunServicesOnce to load
services, does not mean that those keys cannot exist and be used to load
something on NT 5.1.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
C

Curt Christianson

Thanks Wesley--this is a keeper!

--
Curt

http://dundats.mvps.org/
http://www.aumha.org/


| It's called the registry.
|
| Execution Order for starting programs
|
| With Windows XP, 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
| or %allusersprofile%\Start Menu\Programs\Startup
| 11) C:\Documents and Settings\Your Name Here\Start Menu\Programs\Startup
| or %userprofile%\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.]]
|
| 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.exe, fgh.exe and ghj.exe would start in that order. To
| change the order rename the shortcuts to 1ghj.exe, 2dfg.exe and 3fgh.exe.
| They would then start in that order.
|
| Some items are a race every time as to which actually starts first, no
| matter what you do.
|
| --
| Hope this helps. Let us know.
|
| Wes
| MS-MVP Windows Shell/User
|
| In | Rien <[email protected]> hunted and pecked:
| > Hello
| >
| > I have several programs launched at startup and shown in systray :
| > antivirus, firewall, etc : they are recorded in the register base.
| >
| > The problem is that they are never launched in the same order. They seem
| > to be launched at random. When the antivirus is launched in last
| > position, the Windows security center warns me there is no antivirus;
| > it's probably because the security center is launched before the
| > antivirus. I don't think it's very serious, but it's annoying.
| >
| > The question : How can I force the order of launch and place the
| > antivirus first.
| >
| > My configuration : WXP SP2 Media center, Kasperski antivirus, ZoneAlarm
| > Pro firewall.
| >
| > Thank you
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top