Possible Duplicate:
C# Sharp Windows Application prevents Windows from shutting down / logging off
I want to write code for automatically exit from my application when user shutdowns the computer. I have done the project in C# developer.
Now I can't shutdown the computer without manually exiting the application.
Please advice.