Thread: Launching a program on startup

  1. #1
    Registered User
    Join Date
    Sep 2005
    Location
    USA
    Posts
    69

    Question Launching a program on startup

    Hello,
    How can I set the computer to launch a program when it starts up?
    Thanks,
    Adam

  2. #2
    Registered User
    Join Date
    May 2006
    Posts
    903
    You have to modify a registry key but I can't recall which.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    Put it in the startup group (for windows).

    Or maybe tell us which OS you're on.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Sep 2005
    Location
    USA
    Posts
    69

    Os

    Yeah, I'm on Windows XP, but is there any way that I can add it to the startup group with C++ code from the program?
    Adam

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    Are you going to make the program ask the user for permission before adding itself to the startup group?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    You can copy a shortcut to C:\Documents and Settings\user\Start Menu\Programs\Startup (I think). Programs in there are automatically executed when the computer turns on.

    Salem's right, though. You should ask the program user if they want the program to start when their computer turns on. It could be very annoying.

    Why do you want the program to start up when the computer turns on?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Adding program to startup
    By VeX92 in forum C++ Programming
    Replies: 4
    Last Post: 10-28-2007, 01:08 AM
  2. Make a program run at startup
    By cookie in forum Tech Board
    Replies: 2
    Last Post: 06-08-2007, 08:36 PM
  3. insufficient memory for tsr
    By manmohan in forum C Programming
    Replies: 8
    Last Post: 01-02-2004, 09:48 AM
  4. Date program starts DOS's date
    By jrahhali in forum C++ Programming
    Replies: 1
    Last Post: 11-24-2003, 05:23 PM
  5. Replies: 3
    Last Post: 01-14-2003, 10:34 PM