Is there a way or trick to determine whether an application exit command sent by user or sent by system on shutdown
<p>My project simply creates log files that holds the information about the date when the application starts or application exits and how.</p>

<p>Optional Question: How can I add my application to start up list (to msconfig.exe thing)</p>

<p>Optional Question 2: Is there a loss probability when i want to create an only one log file while/before on shutdown?</p>
