The best way is to build a DLL and put it in the AppInit_DLLs registry key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs). Then call ExitProcess in your DllMain. You'll need to have administrative privileges to write to the registry key.

EssLike a rat in a maze who says,
"Watch me choose my own direction"
Are you under the illusion
The path is winding your way? - Rush

What's wrong with a DLL? It's by far the simplest solution. You could use EnumProcesses periodically, then TerminateProcess, but that sounds like hard work.

I have to ask, having been the victim of poor network administration too often - why are you doing this? NT can lock a user to be able to write to their My Documents and Temp folders and to HKEY_CURRENT_USER only. I see no reason to try to prevent people doing anything by any other means, since in that case they can harm no-one. You have perfectly good security mechanisms in NT.

EssLike a rat in a maze who says,
"Watch me choose my own direction"
Are you under the illusion
The path is winding your way? - Rush