"Run CCleaner when the computers exits (!)" not possible ? Strong security issue

I found only an option

"Run CCleaner when the computer starts" but NOT "...exits"

Hey, thats a very strong security hole.

If I forget to perform CCleaner manually all entries and tracks

leave on my computer hard disc.

Wouldn't it be much more useful to offer an option to run CCleaner AUTOMATICALLY

when a shutdown is performed ?

There's no mechanism in Windows (except with currently running services) to execute code on the way out.

This is NOT true.

Setup a logoff script (at least under Win2000/WinXP) as follows:

1.) In "run" enter gpedit.msc

2.) goto LocalComputerPolicy->User Configuration->WindowsSettings->Scripts (Logon/Logoff)

3.) Click on the right pane on logoff and add a script e.g. mylogoffscript.bat

This script is executed at every logoff

However this is very,very unconvenient but it shows that it is possible in general

Why not including this feature in CCleaner?

Alternatively: Ok, as you said, implement and start CCleaner as a service and execute it at shutdown.

Make a batch file that runs CCleaner and then shuts your computer down. Put it on your desktop or make it a shortcut for your desktop.

Additionally; it is not a security hole.