Instead of letting the user fiddle around in some nested, hidden Group Policy editors or Registry branches
CCleaner should offer a simple checkbox which let it run at shutdown time.
It already offers shutdown after a fashion ... as in "run then shutdown". I.e. it triggers a shutdown on completion rather than responds to shutdown events. Don't forget that ccleaner requires a user context, so it has to be done before logoff (as per your original post). It's no use having it in the shutdown script because the context has gone.
Also, not all OS versions (e.g. XP Home) support GP and I don't think (though I've not tried) it's as straightforward as just manipulating the reg keys in those cases.
GP shutdown scripts are stored in the registry under: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Shutdown
They may well be, but as I said I'm not sure it's that simple. If the OS version isn't supporting GP, is the OS going to pick the key up? I could always try it I suppose
The Group Policy Editor is just a UI. You should have a service named: Group Policy Client
Its avail in XP, Vista and 7. Depending on the OS edition you may or may not have gpedit.msc
I cant speak for 2k and NT as I never used either of those enough to remember.
Sure, the console is a UI, but there are other components and directory structures involved. There are plenty of conflicting articles about whether GP will run successfully on XP Home, for example. I've tried installing the 'recommended' components to 'convert' an XP Home machine and have only achieved limited GP functionality. It may be that those particular registry entries (shutdown/logoff) would function ... but for GP as a whole I still believe it's more complex than just adding appropriate registry keys.
Out of the box ... I suspect NT would have had GP, W2K does, XP Pro does, XP Home doesn't.
I was addressing the point that CC can write to the registry key and execute at shutdown ...
I realise that; but that's exactly what I was querying for reasons stated above. I am fairly sure that certain GP features won't work on an XP Home machine, but I think I'm coming round to your way of thinking that for (e.g.) logoff scripts it will work. Unfortunately I don't have access to my XP Pro machine at the moment so I can't see the format of the registry entries to try it out on this XP Home machine.
As an alternative CCleaner could start at boot time with Win(XP) and remain in the Systray (or even invisible resp. visible only in TaskManager). When the user logoff or the computer is shutdown CCleaner will do its cleaning.
With this kind of run in background no gpedit or Registry handling is necessary.
On the other side it would have the advantage to let CCleaner wipe the tracks at the end of a session.
For me its an important point and security issue. If I forgot to start CCleaner manually on my laptop and the laptop gets stolen then the tracks are still existing on my hard disc. If CCleaner would clean at logoff/shutdown these tracks were destroyed.
Many other program use this background runnign trick. Why not CCLeaner?