Suppresses closing dialog when shutting down or closing down via taskmanager.