Jump to content

How run CCleaner BEFORE shutdown? In gpedit.msc as Logoff script?


thoste

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

No fate but what we make

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...

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?

 

Thomas

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.