Jump to content

Excel VBA to run CCleaner


Pete258

Recommended Posts

Is there or has anyone coded Excel VBA to run CCleaner ?

The reason is because Excel hangs when doing continuous web queries and we don't want to have to stop the process and use CCleaner every  ~ 15 minutes or so.

 

 

Thanks

 

 

Link to comment
Share on other sites

  • Moderators

I'm sure if someone sees your thread, and can help, they will.

Meanwhile, have you tried the fount of all wisdom - The Internet?

Backup now & backup often.
It's your digital life - protect it with a backup.
Three things are certain; Birth, Death and loss of data. You control the last.

Link to comment
Share on other sites

  • Moderators

this should get you started;

 

Sub test()
  program = "C:\Program Files (x86)\Notepad++\notepad++.exe"
  File = "C:\Program Files (x86)\Notepad++\readme.txt"
  x = Shell(program + " " + File, vbNormalFocus)
End Sub

 

obviously adjust accordingly.

Backup now & backup often.
It's your digital life - protect it with a backup.
Three things are certain; Birth, Death and loss of data. You control the last.

Link to comment
Share on other sites

Most of the options are here,

 

http://superuser.com/questions/450014/clearmytracksbyprocess-all-options

 

Some of the VBA code/options to use is;

 

Sub Clear_IE()
 
Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8", vbHide
AppActivate "Microsoft Excel"
 
End Sub
 
However, this is "old", it does not seem to compensate for Chrome, after checking with CCleaner, the Chrome folders are still full.
 
The reason this needs to be done in VBA is because of web queries within a Loop in real time, the caches etc become full. 
 
Ideally, if VBA can run CCleaner with user settings without having to stop and do it manually.
 
 
 
obviously adjust accordingly.

 

 
Adjust what ?
 
 
 
Link to comment
Share on other sites

  • Moderators
Adjust what ?

 

 

That macro example I gave you.

It opens a file called readme.txt using NotePad++

So for your needs, change the program variable to use CCleaner and the file variable wouldn't be needed.

Backup now & backup often.
It's your digital life - protect it with a backup.
Three things are certain; Birth, Death and loss of data. You control the last.

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.