Making a program which will start up when PC starts up

So my question is:
How would I make a c++ program that starts up when the user logs in to their account and views the desktop? Such as how MSN starts up automatically when the computers starts.
I already know about the Start Up folder method but I was looking more into the Registry way.
And ofc you can tell I don't really know much about Registry so with the code if you can explain it to me step by step, i'd really be thankful.
Thank you.
Ever heard of Windows registry??
Never mind. Just goto Run, type regedit.
Goto HKCU\Software\Microsoft\Windows\CurrentVersion\Run
Create a new string value. Change its name to your app name and its value to your app path (.exe). Restart your computer and enjoy!

P.S.
Now all you need is to do that stuff in C++ programmatically.
Well I have I just don't know much about it.
I can't find HKCU, I see a folder called Software though.
Would it be possible if you could help me with the code?
Thanks.
Can someone please help?
HKCU means HKEY_CURRENT_USER
.
Maybe, it can help you.
http://stackoverflow.com/questions/508614/create-a-new-windows-registry-key-using-c
So if I were to send someone a .exe file, technically they would also need the new .exe file which tells the registry save the first .exe file so it could start up when the computer starts up?
Yes, and no. When you install a new program, the installer (if needed) sets up the registry so that the program can be run at each startup. But that doesn't mean that the registry can be set up only by a third party software. Your own exe can do that. It all depends upon what you want.
Well I would like for my own .exe to place itself in the user's start up folder or in the registry. Can you help me with a code that would help me do that? Please and thank you.
Why do you think I gave you the link? I can't spoon-feed you everything, I can just show you the way. Hope you will figure out a way. Happy coding!!
Besides, if you don't know much about the Registry we probably shouldn't be helping you create a program that installs itself in a way that it runs on start-up. Even if it's not malicious code it could screw up a PC if you're not sure what you're doing.
Topic archived. No new replies allowed.