Thread: how to make my program run on windows start up

  1. #1
    csd@auth
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    71

    how to make my program run on windows start up

    Hi all, I want to make a program that starts on windows startup.
    I ' ve searched a little and found a good way to do this is to write in registry at
    HKLM\Software\Microsoft\Windows\CurrentVersion\Run
    a key which name is your program name and has a value of your program's path.

    Do you know any function to access the registry?

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    why not to put shortcut to your program into Start/Programs/StartUp folder?
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    You can also, I believe, put it in your scheduled tasks (control pannel->scheduled tasks, I think), and make it run on startup, or once a day or something.

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Reg*, and this should be on the Windows board.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    csd@auth
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    71
    I don't want to do this manually. I want the program make it self run on windows start up.
    Puting it on the start up folder is the easiest way to do it manually but how can this happen programmaticly.

  6. #6
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by kantze
    I don't want to do this manually. I want the program make it self run on windows start up.
    Puting it on the start up folder is the easiest way to do it manually but how can this happen programmaticly.
    Create shortcut programmatically and copy it to that folder... Installshield has it even on the resource level... What installer do you use?
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  7. #7
    csd@auth
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    71
    vart I don't use any installer!
    I'm experimenting on simple programs at the moment.
    I 'd like to make a program that calculate windows up time , how many hours a day i use my pc and other intersting stuff.

  8. #8

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Adventures in labyrinth generation.
    By guesst in forum Game Programming
    Replies: 8
    Last Post: 10-12-2008, 01:30 PM
  2. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM
  3. Simple Windows Program - text?
    By Doagie in forum Windows Programming
    Replies: 1
    Last Post: 11-27-2004, 02:21 AM
  4. FlashWindowEx not declared?
    By Aidman in forum Windows Programming
    Replies: 3
    Last Post: 05-17-2003, 02:58 AM