I have a program that I wish to make windows run it as soon as windows starts up. How would I do this? Would it involve messing with the registry? If so, how would I do it?
Printable View
I have a program that I wish to make windows run it as soon as windows starts up. How would I do this? Would it involve messing with the registry? If so, how would I do it?
Copy it (a shortcut) to the startup folder. Or... add it as a scheduled task to be run on startup.
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.
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.
You've been given the EXACT answer here:
Do you need to get it tattooed to your forehead or what?Quote:
Copy it (a shortcut) to the startup folder. Or... add it as a scheduled task to be run on startup.
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.
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.
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
thanks a lot.
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.