Perturbatio #1 http://www.google.co.uk/search?q=how+to+run+a+program+on+shut+down&start=0&ie=utf-8&oe=utf-8