Startup process

This is a discussion on Startup process within the Tech Board forums, part of the Community Boards category; Hello all, Have a quick question on how to start a process at the system bootup. I know that placing ...

  1. #1
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,682

    Startup process

    Hello all, Have a quick question on how to start a process at the system bootup. I know that placing the exe in the startup folder will startup string when a user logs in. But I wanted to start this as a demon service as soon the machine starts up, regardless if the user logged in or not! It is something to do in the msconfig. But donít know what to do there! Any ides on how to configure the startup services on windows XP?

    Thanks a lot!!

    ssharish
    Life is like riding a bicycle. To keep your balance you must keep moving - Einstein

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    Quote Originally Posted by ssharish2005 View Post
    But I wanted to start this as a demon service as soon the machine starts up


    In the registry take a look at
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Run
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,170
    But that is executed only once the user logs in, no?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  4. #4
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    Quote Originally Posted by Elysia View Post
    But that is executed only once the user logs in, no?
    no,
    User specific data are located in another key

    HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Run
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  5. #5
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,682
    Ok, I can see the the application there which gets initiated. But how do I add my own entry in there?

    ssharish
    Life is like riding a bicycle. To keep your balance you must keep moving - Einstein

  6. #6
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    Quote Originally Posted by ssharish2005 View Post
    Ok, I can see the the application there which gets initiated. But how do I add my own entry in there?

    ssharish
    Right click - new - string - enter the name for the entry and command line to execute
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  7. #7
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Write a system service set to run at startup


    http://msdn.microsoft.com/en-us/libr...41(VS.85).aspx

    be very very very very careful with system service code , you can destroy your OS with them, forcing a reformat to recover
    Last edited by abachler; 01-22-2009 at 09:24 AM.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  8. #8
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,682
    Thanks a lot guys, managed to sort this out. It was very simple.

    Yeah, got a backup of my registry before altering it!!!!

    Thanks again!

    ssharish
    Life is like riding a bicycle. To keep your balance you must keep moving - Einstein

  9. #9
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,170
    Quote Originally Posted by vart View Post
    no,
    User specific data are located in another key

    HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Run
    Yes, that key runs while a specific user logs in, the local machine key runs whenever any user logs in.
    I believe there's a different key for when running a program before any user logs in.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. init adopts zombie process?
    By password636 in forum Linux Programming
    Replies: 4
    Last Post: 07-01-2009, 10:05 AM
  2. create a child process that creates a child process
    By cus in forum Linux Programming
    Replies: 9
    Last Post: 01-13-2009, 01:14 PM
  3. Replies: 3
    Last Post: 10-15-2008, 09:24 AM
  4. Problem with forking a process
    By Unitedroad in forum C Programming
    Replies: 10
    Last Post: 10-04-2007, 01:43 AM
  5. process programming
    By St0rM-MaN in forum Linux Programming
    Replies: 2
    Last Post: 09-15-2007, 07:53 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21