C++
You could do something like have your program create a .reg file and execute it to add it's self to the startup through the registry. There are several ways of adding a program to start when the computer does, you have to make your program do it using one or the other. And also:
Yes, I'm afraid this thread deserves it :(
I have never tried to code a program to start each time Windows opens, so I may be completely off base here. Why don't you utilize the startup folder? My understanding is that Windows will load any program (shortcuts?) that are in that folder when the OS starts.
If you're trying to write a covert program, then this method probably wouldn't satisfy your requirements. You could change the attributes so the icon/file would be hidden within the startup folder, but that is easily defeated…
Good question. I'm sure there are others here that will have better ideas than this one.
Also, here is a list of files from which programs can start from:
- c:\autoexec.bat
- c:\config.sys 3 . windir\wininit.ini - Usually used by setup programs to have a file run once and then get deleted.
- windir\winstart.bat
- windir\win.ini - [windows] "load"
- windir\win.ini - [windows] "run"
- windir\system.ini - [boot] "shell" 8 . windir\system.ini - [boot] "scrnsave.exe"
- windir\dosstart.bat - Used in Win95 or 98 when you select the "Restart in MS-DOS mode" in the shutdown menu.
- windir\system\autoexec.nt
- windir\system\config.nt
Source: http://www.bleepingcomputer.com/tutorials/tutorial44.html
Yeah I found it on google B). I hate being such a google stickler, but I dream that one day people will google for answers before mindlessly making requests on forums for people to do the research for them :@