![]() |
| | #1 |
| Registered User Join Date: Jan 2009
Posts: 81
| Making a program run on startup |
| Poincare is offline | |
| | #2 |
| Registered User Join Date: Jan 2002 Location: Northern Virginia/Washington DC Metropolitan Area
Posts: 2,787
| Copy it (a shortcut) to the startup folder. Or... add it as a scheduled task to be run on startup.
__________________ On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. --Charles Babbage, 1792-1871 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 |
| hk_mp5kpdw is offline | |
| | #3 |
| Registered User Join Date: Jan 2009
Posts: 81
| See, I want I my program to do this automatically, without the user having to do anything. I'm sure you can do this because I've seen loads of programs that run once windows starts. |
| Poincare is offline | |
| | #4 |
| +++ OK NO CARRIER Join Date: Oct 2001
Posts: 10,258
| Well, since that's more of a Windows issue, you'd be better searching a Windows specific forum. Or, you know, just throwing a collection of seemingly random words at a search engine. Might I suggest the following, completely unrelated words: "windows programming C run at startup" I wrote a very complex random word generator, and that was the first thing that it gave me. I can run it again and give you more completely unrelated words if you need them. Honestly though, I'd just as soon not. Quzah.
__________________ Hundreds of thousands of dipshits can't be wrong. Are you up for the suck? |
| quzah is offline | |
| | #5 | ||
| Registered User Join Date: Sep 2006
Posts: 2,502
| Quote:
Quote:
Right click on the program executable, and select "create a shortcut". Then drag that shortcut to the user's startup menu that you want: Documents and Settings\all users\Applications Data (AppData for Vista and Win7)\Start Up, iirc. And quit acting like you haven't been given the correct answer already. Cheers. | ||
| Adak is offline | |
| | #6 | |
| Banned Join Date: Mar 2009
Posts: 533
| Quote:
__________________ ╔╗╔══╦╗ ║║║╔╗║║ ║╚╣╚╝║╚╗ ╚═╩══╩═╝ | |
| ಠ_ಠ is offline | |
| | #7 |
| Registered User Join Date: Sep 2006
Posts: 2,502
| Are you asserting that the start up folder won't start the programs which have shortcuts to them, inside that folder? The user doesn't have to do *anything* - even sign in, depending on which start up folder you choose. |
| Adak is offline | |
| | #8 |
| Registered User Join Date: Dec 2008
Posts: 99
| |
| abraham2119 is offline | |
| | #9 |
| and the hat of sweating Join Date: Aug 2007 Location: Toronto, ON
Posts: 3,119
| I believe he means he wants his program to add something to be started automatically, not doing it by hand. Having your program copy it to the startup folder would probably be the easiest way, but the location of the Startup folder changes with almost every version of Windows, so you'd need to find out which version of Windows you're on before you can know where to copy it... Using the registry might be better, but you'll have to read about the Registry API functions. Here's the location to add the program to: Code: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
__________________ "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008 |
| cpjust is offline | |
| | #10 |
| Registered User Join Date: Jan 2009
Posts: 81
| thanks a lot. |
| Poincare is offline | |
| | #11 | |
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,099
| Adding it to HKEY_LOCAL_MACHINE makes it start up for every user on the machine (and requires admin privileges). You can also add it to: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Curre ntVersion\Run Which makes it start for the current user, only. This does not require admin privileges.
__________________ Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System I dedicated my life to helping others. This is only a small sample of what they said: "Thanks Elysia. You're a programming master! How the hell do you know every thing?" Quoted... at least once. Quote:
| |
| Elysia is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to time how long a program takes to run? | advancedk | C Programming | 2 | 08-18-2008 07:50 PM |
| Get program to copy itself into program files, then start on startup. | guitarist809 | Windows Programming | 6 | 03-03-2008 09:42 AM |
| Need help getting a program to run command prompt and a windows app together | Crazy Glue | C# Programming | 2 | 12-22-2006 08:45 PM |
| What's the code for a program to run in Task manager, under the processes tab | newbie1 | Windows Programming | 5 | 04-17-2003 07:07 AM |
| help making a program run | Dummies102 | C++ Programming | 3 | 02-22-2002 12:51 PM |