COPYING TO BOOT SECTOR

how to create a program that can copy our program's .exe to our boot sector???
so that it runs every time our windows starts???
What programming language are you using ?
You don't copy to the boot sector. If you do, windows will not start. Besides, on BIOS machines, it is my understanding that you need to code in 16-bit real mode, meaning it wouldn't be a Windows executable.

So what you want is a different thing: Just place your executable anywhere (the usual path is C:\Program files\MyFolder) and then write a registry key under HKLM\Software\Microsoft\Windows\CurrentVersion\Run to make it run whenever any user logs in.
A long time ago, I recall that Windows menu thing accessed via the "Start" (?) button on the bottom left contained a sub-directory called "Startup" or the like. Anything in that group was run upon starting windows. Just stick it in there (if it still exists - I haven't used Win since the days of XP).
Besides, unless you have malicious intentions you shouldn't make anything auto-start without asking the user first (that's my opinion anyways, I'd wish more software vendors would be with me there). Which somewhat eliminates the point of trying to do it from inside the program, cause the user can always do it outside of it if he wishes to do so.
Last edited on
Topic archived. No new replies allowed.