This is a reasonably simple project using C++ and? Win32 (no MFC or STL) to watch a registry key, replace it's value and self-launch.
The application should be a console application and when run with no params simply watch the key
HKLM\System\CurrentControlSet\Cotnrol\Session Manager\SetupExecute to see if any sub-keys are added.
Any sub keys represent a binary Microsoft or some installer wants to run on the next reboot.? ? ? You should replace this command with a call to "yourself" and pass the old command.? ? ? ? As a result,? upon the next boot,? your program will execute.? ? When it does, it needs to copy C:\Windows\System32\Etc\Hosts to a tmp file,? execute the normal command, and then replace the file when everything is complete.
This must run on Vista and the exe should be as small as possible (around 20k I would guess with VC 6.0 linked only to msvcrt)