dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Launch a program at startup/login

  1. #1
    Join Date
    Feb 2005
    Posts
    2

    Question Launch a program at startup/login

    Hi,

    I'm developing a program (VB6) that I want to launch at startup (WinXP) and for users not to be able to easily disable.

    I'm familiar with the "StartUp" folder method and also the use of the Registry.... "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run" method but am also aware that programs like ZoneAlarm etc. are loaded at startup and yet (apparently) not by one of these means - how do they do it ?? In fact there are a whole lot of processes going on that are somehow launched by another means and I have installed shareware that does this as well.

    Any hints would be appreciated.

    Doug.

    A nose by any other name still smells the same.

  2. #2
    Join Date
    Aug 2004
    Location
    St. Louis, MO
    Posts
    6
    Doug,

    Looks like there are several candidates for running a program at startup. Below is an edited version of a Knowledge Base article article. As you can see, there are more options than just RunOnce and RunOnceEx. Hope this helps.....

    INFO: Run, RunOnce, RunServices, RunServicesOnce and Startup

    SUMMARY
    This article explains how the Run, RunOnce, RunServices, RunServicesOnce, and RunOnce\Setup registry keys relate to each other and to the Startup folder. It also describes the order in which these keys are loaded.

    The information contained in this article supplements the following article in the Microsoft Knowledge Base:
    137367 Definition of the RunOnce Keys in the Registry
    Please see this article for an explanation of each of these keys.

    MORE INFORMATION
    Under Microsoft Windows 95, Windows 98, and Windows Millennium Edition (Me) where all keys are supported, the keys are loaded in the following order:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices

    <Logon Prompt>

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

    StartUp Folder

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
    With the exception of the HKEY_LOCAL_MACHINE\...\RunOnce key, all keys and their entries are loaded asynchronously. Therefore, all entries in the RunServices and RunServicesOnce keys can potentially run at the same time.

    Entries in the HKEY_LOCAL_MACHINE\...\RunOnce key are loaded synchronously in an undefined order.

    Because the HKEY_LOCAL_MACHINE\...\RunOnce key is loaded synchronously, all of its entries must finish loading before the HKEY_LOCAL_MACHINE\...\Run, HKEY_CURRENT_USER\...\Run, HKEY_CURRENT_USER\...\RunOnce, and Startup Folder entries can be loaded.

    The RunServicesOnce and RunServices keys are loaded before the user logs into Windows 95, Windows 98, and Windows Me. Because these two keys run asynchronously with the Logon dialog box, they can continue to run after the user has logged on. However, since HKEY_LOCAL_MACHINE\...\RunOnce must load synchronously, its entries will not begin loading until after the RunServicesOnce and RunServices keys have finished loading.

    Because of different system configurations (such as a computer that is configured to automatically log on), any application that is dependant upon other applications that are executed under these keys having completed must be prepared to wait until these applications are complete. Other than this exception, the above description applies to Microsoft Windows NT 4.0, Windows 2000, and Windows XP.

    Regards,
    Cliff

  3. #3
    Join Date
    Feb 2005
    Posts
    2

    Startup

    Thanks Cliff.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center