startup

This is a discussion on startup within the C++ Programming forums, part of the General Programming Boards category; how do i get my program to compile and run as soon as it startup my computer? thanx...

  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    17

    startup

    how do i get my program to compile and run as soon as it startup my computer?

    thanx

  2. #2
    Registered User
    Join Date
    Feb 2006
    Posts
    155
    prepare a batch file and include it in the startup folder

  3. #3
    Registered User
    Join Date
    Mar 2006
    Posts
    17
    how to u prepare a batch file?

  4. #4
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,788
    Quote Originally Posted by sniper22
    how do i get my program to compile and run as soon as it startup my computer?

    thanx
    The program starts the computer? How can the program do something if it hasn't been compiled yet? Do you mean "as soon as my computer starts"?

    The batch file mentioned by qqqqxxxx would probably need to call some sort of make command or command-line compiler/linker utility and then (depending on whether or not the compiler/linker was successfull or not) call the compiled program.

    Quote Originally Posted by sniper22
    how to u prepare a batch file?
    If you're on a Windows/DOS system you can just open a text editor and type in the necessary commands (like changing to the directory where the program is stored and running the above mentioned "make" command or command-line compiler) and then save the file with a ".bat" extension. Then add that batch file to your systems startup folder as already stated.

    All of these things depend on your operating system and particular compiler you have installed.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  5. #5
    C / C++
    Join Date
    Jan 2006
    Location
    The Netherlands
    Posts
    312
    Which directory is the startup folder?
    Operating Systems:
    - Ubuntu 9.04
    - XP

    Compiler: gcc

  6. #6
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,788
    Quote Originally Posted by Ideswa
    Which directory is the startup folder?
    On my Windows XP box it is under C:\Documents and Settings\<my user name>\Start Menu\Programs\Startup.

    You can add a shortcut to the batch file you want to have run at system startup directly to that folder and it will get run when you log on (as that particular user).

    You can also go into control panel and use the Scheduled Tasks option and find/select the batch file and then select the "Perform this task when my computer starts" option.

    Of course that's all Windows. Don't know what would be required under the Linux environs.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  7. #7
    Registered User
    Join Date
    Mar 2006
    Posts
    17

    not reading from text

    i dont know whats wrong with this code, it enters method, but it doesnt enter while loop

  8. #8
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by sniper22
    i dont know whats wrong with this code, it enters method, but it doesnt enter while loop
    what while loop? </hint>
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Startup process
    By ssharish2005 in forum Tech Board
    Replies: 8
    Last Post: 01-23-2009, 04:01 AM
  2. Get program to copy itself into program files, then start on startup.
    By guitarist809 in forum Windows Programming
    Replies: 6
    Last Post: 03-03-2008, 08:42 AM
  3. Replies: 1
    Last Post: 07-12-2005, 09:03 PM
  4. Startup using STARTUP folder method for winXP & win98
    By hanhao in forum Windows Programming
    Replies: 2
    Last Post: 05-26-2005, 04:59 AM
  5. The long startup.
    By Sentaku senshi in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 08-10-2002, 11:52 PM

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