How To Run A Script or Command At Logoff in Windows 7 & 8 - NEXTOFWINDOWS.COM
You can use the Task Scheduler to execute a script or command at startup or during the login process but you can't use it to do the same during the