You should have a look at

http://www.conitec.net/beta/sys_active.htm

and

http://www.conitec.net/beta/ain-exec.htm

Espers suggestion concerning the registry is dangerous in terms of concurrency. You cannot atomically read and write a registry value.


Always learn from history, to be sure you make the same mistakes again...