Ir al contenido principal

Software | Windows | Utilidades | Solucion | Copiar archivo, Eliminar temporales de usuario e Internet Explorer W7

Eliminar temporales de usuario e Internet Explorer con comandos .BAT para Windows 7

Esto es muy antiguo, pero va servirle a muchos; ya que realiza tareas basicas de limpieza, con algunos tunning que calro pueden modificar y mejorar; realizan la funcion de algunos programas como CCleaner, GlarySoft cleaner; pero gratuitamente sin tener licencia.

He creado dos comandos el primero "limpiartemporales.bat" para que se ejecute en el usuario que inicie sesion y realice la funcion de limpieza, y el otro "copiarylimpiartemporales.bat" que copia primer archivo, con solo ejecutarlo en la carpeta de inicio de sesion de paso hace una limpieza.

Como mucho encontré scripts o comandos para eliminar todo archivos temporales.




Una forma sencilla de aplicar la eliminación de temporales, historiales, cookies y almacenamiento de contraseñas en el navegador sería ejecutando por ejemplo un fichero BAT que realizase estas tareas. Si queremos ejecutarlo automáticamente cada vez que el usuario inice o finalice sesión solo deberíamos introducir el archivo "limpiartemporales.bat" dentro de:

C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Dentro del fichero BAT debería contener lo siguiente dependiendo de los datos que queramos eliminar:

Copy Files
xcopy /y/d/e/c/i/r "\\Ubicacion_en_red_del_archivo\Limpiartemporales.bat" "C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"

Delete Temporary Users Files
cd C:\Users\%username%\AppData\Local
rmdir /S /Q Temp

Delete Temporary Internet Files
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

Delete Cookies
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

Delete History
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

Delete Form Data
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16

Delete Stored Passwords
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32

Delete All
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

Delete All with the “Also delete files and settings stored by add-ons” options selected
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351


Ejemplo:

Archivo 1: Limpiartemporales.bat 

@echo off 
title Limpiando Archivos Temporales, aguarde por favor...
echo.
echo realizando limpieza, aguarde por favor...[%110%%]
echo.
echo realizando limpieza, aguarde por favor...[%125%%]
echo.
echo realizando limpieza, aguarde por favor...[%154%%]
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
echo.
echo realizando limpieza, aguarde por favor...[%167%%]
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
echo.
echo realizando limpieza, aguarde por favor...[%182%%]
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
echo.
echo realizando limpieza, aguarde por favor...[%189%%]
echo.
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
echo.
echo realizando limpieza, aguarde por favor...[%190%%]
echo.
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
echo.
echo realizando limpieza, aguarde por favor...[%199%%]
echo.
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
echo.
echo realizando limpieza, aguarde por favor...[%1100%%]
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
echo.
echo Esta es la ultima ventana, la limpieza ha culminado, gracias.
echo.
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
echo.
cd C:\Users\%username%\AppData\Localrmdir /S /Q Temp

Archivo 2: copiarylimpiartemporales.bat

@echo off 
title Limpiando Archivos Temporales, aguarde por favor...
echo.
echo realizando limpieza, aguarde por favor...[%110%%]
echo.
echo realizando limpieza, aguarde por favor...[%125%%]
echo.
xcopy /y/d/e/c/i/r "\\Ubicacion_en_red_del_archivo\Limpiartemporales.bat" "C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" 
echo.
echo realizando limpieza, aguarde por favor...[%154%%]
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
echo.
echo realizando limpieza, aguarde por favor...[%167%%]
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
echo.
echo realizando limpieza, aguarde por favor...[%182%%]
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
echo.
echo realizando limpieza, aguarde por favor...[%189%%]
echo.
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
echo.
echo realizando limpieza, aguarde por favor...[%190%%]
echo.
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
echo.
echo realizando limpieza, aguarde por favor...[%199%%]
echo.
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
echo.
echo realizando limpieza, aguarde por favor...[%1100%%]
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
echo.
echo Esta es la ultima ventana, la limpieza ha culminado, gracias.
echo.
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
echo.
cd C:\Users\%username%\AppData\Localrmdir /S /Q Temp


by @AQPComputer

Comentarios

Entradas populares de este blog

Windows | Linux | Java SE 8 Archive Downloads (JRE y JDK 8u211 and later)

 https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html Java SE 8 Archive Downloads (JDK 8u211 and later) Go to the  Oracle Java Archive  page. The JDK is a development environment for building applications using the Java programming language. The JDK includes tools useful for developing and testing programs written in the Java programming language and running on the Java TM  platform. Important Oracle JDK License Update The Oracle JDK License has changed for releases starting April 16, 2019. The new  Oracle Technology Network License Agreement for Oracle Java SE  is substantially different from prior Oracle JDK licenses. The new license permits certain uses, such as personal use and development use, at no cost -- but other uses authorized under prior Oracle JDK licenses may no longer be available. Please review the terms carefully before downloading and using this product. An FAQ is available  here . Commercial licens...

Google | Chrome | Navegador | Versiones | Windows, Linux y MAC OS

Google Chrome Older Versions Download (Windows, Linux & Mac) Why use an older version of Google Chrome? Google only provides an online setup file for Google Chrome which installs the latest version of Google Chrome. It happens frequently that a user upgrades to a new version of Google Chrome and gets upset by an unpleasant feature, a missing option or an annoying bug. Therefore, some users want to roll back to an older version of Google Chrome to preserve a useful feature, option or support some legacy technology. However, is it really wise to use an out-dated verison of Google Chrome? The answer is NO since out-dated browsers usually come with security issues. For users who insist on using an old version of Google Chrome and  becoming vulnerable to security issues , you can find the right version of Google Chrome to download for your platform in the following sections. Support of Java, Silverlight and NPAPI plugins Unfortunately, we only started to archive old versions of Chro...

SERVER | WINDOWS | Administración de HP Proliant DL ILO 4, 5 , 6 mediante PowerShell comandos

  A dministración de HP ILO mediante PowerShell Recientemente, Hewlett-Packard ha publicado un conjunto de 110 cmdlets de PowerShell que permiten a los administradores de Windows y a los profesionales de TI configurar y gestionar de forma remota las interfaces de HP ILO en servidores HP desde sistemas Windows.  Este conjunto de cmdlets se denomina  HP Scripting Tools para Windows PowerShell  y está diseñado para funcionar con HP iLO 3 e iLO 4. Los cmdlets están unidos en el  módulo  HPiLOCmdlets  y están destinados a: Buscar y escanear interfaces de la OIT en la red Acceso a la configuración de la OIT, que incluye: configuración de ip, usuarios de la OIT, administración de energía, registros, IML, etc. Capacidad para administrar varias placas iLO simultáneamente Puede descargar HP Scripting Tools para Windows PowerShell  aquí  .  Elija la versión y el valor de bits de su sistema (se admiten Windows 7 SP1, Microsoft Windows 8, Microsoft W...