See the question and my original answer on StackOverflow

You should have a look at Windows Task Scheduler. Tasks can be scheduled to execute when a user (specific or any) logs on. The UI provided out-of-the-box by Windows illustrates what can actually be done with this standard Windows feature.

Another solution is to write a Windows service (the .msi Windows Installer is in fact a service).

I'm not sure you will be able to block Windows Explorer though...