Jump to content
CCleaner Community Forums
Pete258

Excel VBA to run CCleaner

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

 

 

Share this post


Link to post
Share on other sites

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

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

Share this post


Link to post
Share on other sites
Meanwhile, have you tried the fount of all wisdom - The Internet?

 

 

Yes.

 

The reply was to ask here, at this forum.

 

 

 

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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 ?
 
 
 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
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...