Temp Files & Internet Browser Scripts

Has anyone found any Batch files to clear out the temp files and internet browser temp files that work?

Hi @doveroh

You can use “System Cleaner” Tool from RMM when you are in a Session with a Device.

It doesn’t clean out the Internet Browser Temp Files, There was an enhancement request for it, but it hasn’t been implemented yet and I need to get a way to do this ASAP.

We have escalated this and we will get back to you as soon as we have a resolution.

Thanks Scott, and when I say browsers, I mean, IE, Firefox, Chrome, ect. :slight_smile:


there is another post that might be helpful until the system cleaner improved. please check that out as well.



Yep, I currently have the Tron Script but that is for toolbars and such and not for cache/temp files. Tron has another heavy script but requires 600MB+ transfer of many folders and files and might do the cleaning part of it. I am trying to work on a script that would work to determine the OS and find the temp files locations for the browsers. Anyone want to work on it with me or do you think this might be released soon?

Hi @doveroh @Ilker ,

Here is a batch file we use its probably not perfect but check it out its for Chrome, Firefox and Internet Explorer

Browser Cleanup.zip (534 Bytes)

Hi @doveroh @Ilker ,

Ok found an error in that batch file sorry and also added support for Microsoft Edge browser as well as users temp folder and recent docs. new file attached.

User and Browser Cleanup.zip (731 Bytes)

Thanks Marveltec, I will take a look at it and test it.

Hi @doveroh ,

Perfect let me know how it goes and if you have/find any improvements please share :slight_smile:

@Marveltec sounds like a plan. Right now my users are requesting a notification when their weekly cleanup is done, so I have added a message box that popups up on their machine when the script has finished running.

@Marveltec one other change I made was add @echo off at the top of the script. I haven’t been able to get the script to run for some reason a procedure. If I run it manually on the machine it works good.

Hi @doveroh ,

I’m not sure how you are deploying or running the bat file as a procedure remotely so not sure why its not working for you as a procedure. I will explain how we use bat files to run as procedures that work.

there are two methods.

  1. you must create a procedure that first transfers the bat file from your PC to the PC/Laptop that you need to run it on and then runs it (screen capture of said procedure creation attached).
  2. you can create a SFX archive that will extract the bat file and run it on execution. upload this sfx to your web hosting (web space) and create an application install procedure from RMM Console to download and run the sfx.

@Marveltec I transfer it first, then I do cmd.exe and under process parameters I put:
/c start /d “c:\CTG” UserandBrowserCleanup.bat

This is how it was explained to me to run bat files. But still haven’t been able to get them to run from what I can tell. I am going to try your method to see if that works by just putting everything in the process name field.

@Marveltec It seems your setup works to run the bat file. Some of my clients want to know when something was done on their computer and I wanted to created a log file or something to put on their desktop for easy access. I haven’t been able to get that part to work. I don’t know if it is permissions issue or if it is a path issue.

rem --------------------
rem create an audit file
rem --------------------
cd %userprofile%\desktop

@echo =============================>> TuneUpCompleted.txt
@echo TUNE UP COMPLETED! >> TuneUpCompleted.txt
@echo =============================>> TuneUpCompleted.txt
@echo CTG Has completed a tuneup of your computer on %DATE% . >> TuneUpCompleted.txt
@echo Thank you for using our Customer Care Service! Please email us at email if you have any questions or issues >> TuneUpCompleted.txt
@echo You MAY delete this file if needed! >> TuneUpCompleted.txt

Hi @doveroh ,

Good to hear you got the bat file to work as a procedure. I see a problem with your script.

you must remember that running a procedure from RMM Console will use an elevated command prompt to run the bat file so tyring to call a folder using %userprofile% will not work as none exists for the user that is running the script. you would have to create a folder on the c drive and copy it to all desktops on the PC. I have added this to the original bat file i sent you so you might have to update it with your improvements. see attachement

cleanup.zip (976 Bytes)

@Marveltec You are right. I made the changes and used your script and it worked perfect! Thanks

There are some instances, where I would need to configure this option. There are situations where I con not delete cookies, due to it messing up some specific stuff on some specific important sites.

I use ccleaner, it does a really good job and doesn’t mess anything up.

First create a procedure to file transfer the ccsetup.exe file and the batch file.

@REM Silent Install CC Cleaner

ccsetup.exe /S

@REM Add CCleaner To Windows Path

path %path%;C:\Program Files\CCleaner;C:\Program Files (x86)\CCleaner

@REM Silent Update CC Cleaner

ccleaner.exe /update

@REM Silent Run CC Cleaner With Default Settings

ccleaner.exe /auto

@REM Silent UnInstall CC Cleaner

C:\Program Files\CCleaner\uninst.exe /S

C:\Program Files (x86)\CCleaner\uninst.exe /S