Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Run Automatically
Message
De
22/03/1999 00:11:21
 
 
À
21/03/1999 21:49:42
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00200343
Message ID:
00200354
Vues:
8
>I use VB6, How can I make my application auto run when windows start ?

Regardless of platform, there are several ways to start an application. Which approach you use depends on when in the Windows restart process you want the application to fire.

You can use the Registry, WIN.INI (in Win9x only) or by placing a shortcut in the appropriate Start menu/Programs/Start Up folder.

The Registry approach gives you finer control of sequencing. In order to start an application after the Windows login process, you can create a registry value entry under the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run key; this will cause the application to fire whenever the Windows login process finishes. You can cause a program to run once, after the next Windows login process completes, by writing a registry value under the RunOnce subkey rather than the Run key.

You can get the application to start before the Windows login completes by writing a RunService or RunServiceOnce subkey. There are differences in how things behave started as Services under NT in terms of security issues and interaction with the Windows graphical interface.

Shortcuts found in the StartUp subfolder of the current user's Start Menu/Programs hierarchy are run after all Run and RunOnce keys have finished loading. If you are running under Win9x with profiles enabled, each user may have their own Start Menu folder hierarchy. Under NT, each user has his own Start Menu hierarchy; there is also an All Users folder hierarchy common to all users.

Under Win9x, the run= and load= lines of the WIN.INI file are still read and processed, but they're primarily there for backwards compatibility, and should not be used in most cases.

>thanks
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform