Help - Search - Members
Full Version: How run CCleaner BEFORE shutdown? In gpedit.msc as Logoff script?
Piriform Community Forums > Piriform Software > CCleaner Discussion
thoste
Is it possible to run CCleaner just before shutdown (=not at startup) ?

Maybe this is possible through using "Group Policy" editor:

Start->Run->"gpedit.msc"->User Configuration->Windows Settings->Scripts->Logoff

Did anyone tried this out?

What parameters do I have to pass to CCleaner at the command line to run it silently (without prompts) ?

Thomas
marmite
Hi thoste

e.g. "C:\Program Files\CCleaner\CCleaner.exe" /AUTO

See here for more information on ccleaner command-line usage.

Yes you should be able to use GP to do this.
DennisD
For the Auto-Shutdown feature, you'll find detailed instructions here on how to set it up.

That is of course only if you need them.

http://forum.piriform.com/index.php?showtopic=16551
thoste
QUOTE (marmite @ Oct 30 2009, 04:52 PM) *
Yes you should be able to use GP to do this.


That would be a nice option for the next release of CCleaner

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.

Internally CCleaner could imitate the manual GroupPolicy entry.

Is this feasible in the next release?

Peter
ident
QUOTE (thoste @ Nov 3 2009, 03:16 PM) *
CCleaner should offer a simple checkbox which let it run at shutdown time.


Hello, please have a little think about the difficulties in adding this would be
marmite
QUOTE (thoste @ Nov 3 2009, 03:16 PM) *
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.
Disk4mat
GP shutdown scripts are stored in the registry under: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Shutdown

In theory CC could add the registry key with its path and switch.
marmite
QUOTE (Disk4mat @ Nov 3 2009, 09:50 PM) *
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 smile.gif
Disk4mat
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.
marmite
QUOTE (Disk4mat @ Nov 4 2009, 12:40 AM) *
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.
Disk4mat
I was addressing the point that CC can write to the registry key and execute at shutdown. I strayed from the point some what.
marmite
QUOTE (Disk4mat @ Nov 4 2009, 05:39 AM) *
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.
Disk4mat
When you do have some free time check out this page. Just found it in a search. Theres more info there than I previously knew about.

http://www.j79zlr.com/gphome.php

Gives me a few good ideas biggrin.gif
marmite
QUOTE (Disk4mat @ Nov 4 2009, 10:06 AM) *
When you do have some free time check out this page. Just found it in a search. Theres more info there than I previously knew about.

http://www.j79zlr.com/gphome.php

Thanks ... I found that one last night too ... couldn't find any mention of logoff / shutdown scripts though!!!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.