Indigo Rose Software

Go Back   Indigo Rose Software Forums > Old Versions > Setup Factory 6.0 > Setup Factory 6.0 Knowledge Base

 
 
Thread Tools Display Modes
  #1  
Old 10-01-2002
Support Support is offline
Super Moderator
 
Join Date: Jan 2000
Location: Indigo Rose Corporation
Posts: 204
HOWTO: Make a Program Run Every Time the System Starts

HOWTO: Make a Program Run Every Time the System Starts

HOWTO: Make a Program Run Every Time the System Starts

Document ID: IR02015
The information in this article applies to:
  • Setup Factory 6.0

SUMMARY

This article explains how to make a program run every time the system starts.

DISCUSSION

Certain programs run each time the system starts; some are necessary for the operating system to function, and others to provide convenience to the end user. It may be necessary that your program be launched each time the system starts; fortunately Setup Factory can accomplish this easily.

Note: It is considered poor etiquette to do this on a user's system unless it is an essential process, service, or they have agreed to it.

Making your program run every time the system starts amounts to nothing more then creating a Registry entry in the: "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Run" Registry key. The Registry value that you create can be called anything (as long at its length is less then 32 characters), and its value should be the full path to the executable that will be launched when the computer boots.

Note: Since you will be modifying the "HKEY_LOCAL_MACHINE" Registry key make sure that your user has administrative permissions by using the %IsUserNTAdmin% built-in variable. For more information see knowledge base article IR02010: "HOWTO: Detect Administrator Privileges".

Example

Here is an example of a Modify Registry action that will set our program "%AppDir%\MyProgram.exe" to run each time the computer starts.

Note: You can place this action on any event during your installation, however it is recommended that this action be placed on the "Before Installing" or "After Installing" event:

Registry Action: Set Value
Main Key: HKEY_LOCAL_MACHINE
Sub Key: Software\Microsoft\Windows\CurrentVersion\Run
Value name: My Program
Value type: REG_SZ
Value data: %AppDir%\MyProgram.exe
This action creates an entry in the "Run" key, which will make our program "MyProgram.exe" launch each time the computer reboots. Since we created this Registry value using an action we will also have to remove the value using an action during the uninstall. If we do not remove this value the user will receive error messages informing them that "MyProgram.exe" could not be found.

Put this action on either the "Before Uninstalling" or "After Uninstalling" event:
Registry Action: Delete Value
Main Key: HKEY_LOCAL_MACHINE
Sub Key: Software\Microsoft\Windows\CurrentVersion\Run
Value name: My Program

MORE INFORMATION

For more information please see the following topics in the Setup Factory 6.0 Help:

  • Command Reference | Actions | Individual Actions | Modify Registry
  • KEYWORDS: Setup Factory, Registry, Modify Registry


    Last reviewed: October 1, 2002
    Copyright © 2002 Indigo Rose Corporation. All rights reserved.
     

    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is On



    All times are GMT -6. The time now is 03:33 PM.


    Powered by vBulletin® Version 3.8.4
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
    Indigo Rose Software