Jump to content


Run ccleaner at shutdown?


9 replies to this topic

#1 OFFLINE   matttye

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 10 March 2009 - 03:32 PM

I was just wondering if there's a way to run CCleaner automatically at shutdown rather than startup? At the moment I run it manually every time I shut down but I forget sometimes.

On a side note I can't believe such a great program was written in visual basic! First time I ran it a few weeks ago it removed gigabytes of unused files and registry keys, and sped up my computer no end. I swear by it now :D

#2 OFFLINE   hazelnut

    try to stay calm

  • Moderators
  • 9,460 posts
  • Gender:Female
  • Location:Huddersfield uk

Posted 10 March 2009 - 03:56 PM

You might want to have a read here Mattye

http://forum.pirifor...showtopic=16551

and here

http://docs.piriform.com/ccleaner/advanced...line-parameters

Welcome to the forum :)
CCLEANER, RECUVA, DEFRAGGLER AND SPECCY DOCUMENTATION CAN BE FOUND HERE

http://www.piriform.com/docs

#3 OFFLINE   matttye

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 10 March 2009 - 04:30 PM

View Posthazelnut, on Mar 10 2009, 03:56 PM, said:

You might want to have a read here Mattye

http://forum.pirifor...showtopic=16551

and here

http://docs.piriform.com/ccleaner/advanced...line-parameters

Welcome to the forum :)

That looks perfect, now I just need to find a way to run CCleaner when I click on shut down... google here I come!

Thanks :D

#4 OFFLINE   Tom.B

    Member

  • Members
  • PipPip
  • 28 posts
  • Gender:Male
  • Location:Adelaide, SA, Australia.

Posted 10 March 2009 - 04:33 PM

It's a godsend, I know :D

Sometimes it's hard to understand why it's all FREE :wub:

#5 OFFLINE   inca2319

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 11 March 2009 - 10:22 PM

To run ccleaner at shutdown, I believe you could just use start --> run --> gpedit
I know there's an option somewhere in there for logon/logoff and startup/shutdown scripts. One of those will work.

#6 OFFLINE   sirwardle

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 11 March 2009 - 11:18 PM

It should be noted that gpedit will only work on Professional versions of windows e.g. 2000, XP Pro, Vista Business or Ultimate

#7 OFFLINE   Twinkie

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 12 March 2009 - 02:03 AM

View Postmatttye, on Mar 10 2009, 10:32 AM, said:

I was just wondering if there's a way to run CCleaner automatically at shutdown rather than startup? At the moment I run it manually every time I shut down but I forget sometimes.

On a side note I can't believe such a great program was written in visual basic! First time I ran it a few weeks ago it removed gigabytes of unused files and registry keys, and sped up my computer no end. I swear by it now :D
Wow, in VB??? That amazes me, I was sure it had to be C++.

The best way to make an automatic cleaning, if you do not prefer it to be an icon in your desktop which you can click at will (because cleaning of temporary files after the restart of an install could harm your computer) would best be set in the Task Scheduler at Start -> Computer (Right Click) -> Manage - > System Tools -> Task Scheduler. Or you could just find it in control panel under administrative tools.

#8 OFFLINE   Karl1982

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 05 June 2009 - 11:30 PM

I thought of the group policy object method on my own the other day, but I'm having a problem with it. I have it run a batch file at shutdown, which is:

echo Script ran at last shutdown. > c:\users\karl\desktop\shutdownlog.txt
C:\PROGRA~2\CCleaner\ccleaner.exe /auto

Note that these commands are correct individually. The first line is so I know the batch file was actually run. It drops a text file on my desktop, which I delete afterward. If the file is there, the script ran at shutdown. The second line is PROGRA~2 because I'm running 64-bit Windows 7 RC and the actual folder is "C:\Program Files (x86)\CCleaner". It's definitely correct because I can paste the line into a command prompt and it runs CCleaner. Each line does exactly what it should do.

And I know that the script is running at shutdown because it's dropping the text file on my desktop every time. But it's not cleaning. After restarting a few times, I ran CCleaner and analyzed, only to find I still had a gig of trash on my drive. I'm at a loss as to why.

#9 OFFLINE   Andavari

    Captain Spectacular

  • Moderators
  • 13,330 posts
  • Gender:Male
  • Location:Shadow Moses

Posted 06 June 2009 - 10:46 AM

View PostKarl1982, on Jun 5 2009, 05:30 PM, said:

The second line is PROGRA~2 because I'm running 64-bit Windows 7 RC and the actual folder is "C:\Program Files (x86)\CCleaner". It's definitely correct because I can paste the line into a command prompt and it runs CCleaner.
If CC isn't running perhaps change that path to something else like the full path on your system wrapping in quotes, that is if GPEDIT allows for that which I don't know:
"C:\Program Files (x86)\CCleaner\CCleaner.exe"

-or-

%ProgramFiles%\CCleaner\CCleaner.exe
Complexity of incoherent design.

#10 OFFLINE   Aethec

    Red Panda

  • Members
  • PipPipPipPip
  • 1,714 posts
  • Gender:Male
  • Location:Lausanne, Switzerland

Posted 06 June 2009 - 01:54 PM

It is %ProgramFiles(x86)% and not %ProgramFiles% to go to C:\Program Files (x86)\ ;)
Piriform French translator