Jump to content

Clean on Exit


djmccartney

Recommended Posts

Hi djmccartney,

 

Indeed it is possible to have CCleaner run at user logoff but this is not included as an application feature, rather you have to call CCleaner during logoff.

 

The way I acomplish this is by adding a logoff script to the local group policy on the system (this assumes you use Windows 2000 or above).

 

The vbs code I use is below:

 

Dim WshShellSet WshShell = Wscript.CreateObject("Wscript.Shell")strCmd = ("ccleaner.exe /auto")WshShell.CurrentDirectory = "C:\Program Files\CCleaner"WshShell.Run strCmd,1,TRUE

 

And of course you can just call "ccleaner.exe /auto" in a batch file and add that as your logoff script if you do not want to use vbs as I have done (I much prefer to use vbs but it's totally unnecessary for something this simple!).

 

For information on logoff scripts go here.

 

HTH

Link to comment
Share on other sites

Thanks for the suggestions!

 

Dave

 

 

Hi djmccartney,

 

Indeed it is possible to have CCleaner run at user logoff but this is not included as an application feature, rather you have to call CCleaner during logoff.

 

The way I acomplish this is by adding a logoff script to the local group policy on the system (this assumes you use Windows 2000 or above).

 

The vbs code I use is below:

 

Dim WshShellSet WshShell = Wscript.CreateObject("Wscript.Shell")strCmd = ("ccleaner.exe /auto")WshShell.CurrentDirectory = "C:\Program Files\CCleaner"WshShell.Run strCmd,1,TRUE

 

And of course you can just call "ccleaner.exe /auto" in a batch file and add that as your logoff script if you do not want to use vbs as I have done (I much prefer to use vbs but it's totally unnecessary for something this simple!).

 

For information on logoff scripts go here.

 

HTH

 

23266[/snapback]

 

 

 

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.