I want to make an application that would run in the background and trap the Windows Shut Down event to call a function.