Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

S_R_S5's Avatar
Member
0 0

In c++ how do I make the program start each time windows loads? Lets say I make a virus, how do I make it load each time windows does?

Thanks, S_R_S


ghost's Avatar
0 0

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 :(


SET's Avatar

SET

Peumonoultramicroscopicsilico
0 0

HAHAHAHAHA I LOVE THE PIC PERFECT EXPRESSION


ghost's Avatar
0 0

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.


ghost's Avatar
0 0

Also, here is a list of files from which programs can start from:

  1. c:\autoexec.bat
  2. c:\config.sys 3 . windir\wininit.ini - Usually used by setup programs to have a file run once and then get deleted.
  3. windir\winstart.bat
  4. windir\win.ini - [windows] "load"
  5. windir\win.ini - [windows] "run"
  6. windir\system.ini - [boot] "shell" 8 . windir\system.ini - [boot] "scrnsave.exe"
  7. windir\dosstart.bat - Used in Win95 or 98 when you select the "Restart in MS-DOS mode" in the shutdown menu.
  8. windir\system\autoexec.nt
  9. 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 :@


Uber0n's Avatar
Member
0 0

S_R_S5 wrote: Lets say I make a virus, how do I make it load each time windows does?

If you don't even know that, I'm not sure you'll be able to code a strong virus… :right:


ghost's Avatar
0 0

Uber0n wrote: If you don't even know that, I'm not sure you'll be able to code a strong virus… :right: Lol..

S_R_S5 wrote: Lets say I make a virus, how do I make it load each time windows does? services is one of the way.. but i am not sure how to do it in C++, but C#.