Why do my auto-launch apps look weird on Vista?

The product we are working on allows the user to easily configure it to automatically start each time the computer starts. This is useful because the product is part of the core work environment of most of our users.
This function was implemented not so long ago, and for a while everything was fine, but when we started testing this function in Vista, the product began to behave very strange at startup. In particular, our product uses another product (lets call it X), which it launches when it needs its services. The actual problem is that whenever X starts immediately after logging in, it resets or reports critical errors related to disk access (this happens even when X starts directly, and not through our product).

This happens whenever we launch our product by registering it in “Run” in the registry or by placing the “Startup” folder in it in the “Start Menu”, even if we set a delay of ~ 20 seconds before the actual start of the launch. When we changed the delay to 70 seconds, everything is fine.

We tried to reproduce the problem by launching our product manually immediately after entering the system (by double-clicking on the shortcut located on the desktop), but to no avail.

Now, how is it possible that applications that start normally a minute after logging in report such hard errors on startup right after logging in?

+6
windows-vista virtual-pc
source share
2 answers

This is the effect of a new feature in Vista called Boxing: Windows has several mechanisms that allow the user / administrator to configure applications to automatically start when Windows starts. This function is mainly used for one of the following purposes: 1. Programs that are part of the user's main work environment, so the first action that the user usually takes when starting the computer is to start them. 2. All kinds of background "agents" - skype, instant messenger, winamp, etc.

When too many (or too heavy) programs are registered to run at startup, the end result is that the user cannot actually do anything during the first few seconds / minutes after logging in, which can be very annoying. Enters Vista Boxing:

In short, Vista forces all programs called with the Run key to work with low priority for the first 60 seconds after logging in. This affects both the I / O priority (which is set to Very Low) and the CPU priority . Very low priority I / O requests do not go through the cache file, but go directly to disk. Thus, they are much slower than normal I / O. The length of the boxing period is set by the registry value: "HKLM \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced \ DelayedApps \ Delay_Sec".

For a more detailed explanation, see here and here.

+6
source share

A program may need additional information placed in its properties. It should run as, and not just work.

Perhaps this application should be developed as a service, and not to run the program, or you may have a service that runs the program when the best window of opportunities is determined.

0
source share

All Articles