miércoles, 5 de abril de 2017

SCRIPT:02. "MANTENIMIENTO DE WINDOWS v. 3.0"



REQUISITOS.

PROGRAMAS:
-BLOCK DE NOTAS.
-SISTEMA OPERATIVO WINDOWS.
-MAQUINAS VIRTUALES.
-CMD.

OBJETIVOS:
-REALIZAR MANTENIMIENTO DEL SISTEMA OPERATIVO WINDOWS.
-ELIMINAR ARCHIVOS BASURAS, PROGRAMAS INNECESARIOS.
-ELIMINAR ARCHIVOS TEMPORALES, COOKIES, HISTORIAL.
-ELIMINAR  CARPETAS VACIAS, ARCHIVOS DUPLICADOS.
-ACELERAR EL INICIO DE WINDOWS.
-LIMPIAR LOS RECURSOS DE PROGRAMAS EN SEGUNDO PLANO.
-LIMPIAR CACHE Y DNS DE LA NAVEGACIÓN EN INTERNET.
-LIMPIAR EL REGISTRO DE MODIFICACIONES DE PROGRAMAS.
-RECUPERAR SECTORES DAÑADOS DEL DISCO DURO.
-DEFRAGMENTAR EL ÓRDEN DE LECTURA DE LOS ARCHIVOS.
-RENOVAR IP DINAMICA EN CADA ADAPTADOR DE RED.


ESTRUCTURA DE COMANDOS POR LOTES (CÓDIGO FUENTE):
@echo off

mkdir "mantenimiento\vbs"

echo msgbox "Soporte Técnico de Computadores 315682745 - Cali",,"Redes en Computadores" >"mantenimiento\vbs\RedesenComputadores.vbs"

:5
cls & color 60 & Title Menu Principal.

echo -------------------------------------------------------
echo -------------------------------------------------------
echo - Script creado por Omacias de Redes en Computadores. -
echo -------------------------------------------------------
echo -------------------------------------------------------
echo.
date /t
echo.
time /t
echo.
echo.

echo 0. CREAR SCRIPT DE MANTENIMIENTO.
echo.
echo 1. REALIZAR MANTENIMIENTO DEL SISTEMA.
echo.
echo 2. INICIAR WINDOWS. 
echo.
echo 3. ELIMINAR SCRIPT.
echo.
echo 4. ERROR EN EL ARCHIVO.
echo.


set /p PASO=Indique por favor el numero de la operacion a realizar: 

REM Aqui se crea las opciones de los menus en que vamos a trabajar.

IF "%PASO%"=="0" (GOTO 0) 
IF "%PASO%"=="1" (GOTO 1) 
IF "%PASO%"=="2" (GOTO 2)
IF "%PASO%"=="3" (GOTO 3)
IF "%PASO%"=="4" (GOTO 4)
goto 5

:0

mkdir "mantenimiento\vbs"

echo msgbox "Soporte Técnico de Computadores 315682745 - Cali",,"Redes en Computadores" >"mantenimiento\vbs\RedesenComputadores.vbs"

cls & color 16 & Title Creando Script de Mantenimiento.

echo -------------------------------------------------------
echo -------------------------------------------------------
echo - Script creado por Omacias de Redes en Computadores. -
echo -------------------------------------------------------
echo -------------------------------------------------------
echo.
echo .
timeout /nobreak 0
cls
echo -------------------------------------------------------
echo -------------------------------------------------------
echo - Script creado por Omacias de Redes en Computadores. -
echo -------------------------------------------------------
echo -------------------------------------------------------
echo.
echo ..
timeout /nobreak 0
cls
echo -------------------------------------------------------
echo -------------------------------------------------------
echo - Script creado por Omacias de Redes en Computadores. -
echo -------------------------------------------------------
echo -------------------------------------------------------

echo:
date /t
echo.
time /t
echo.
echo.
echo ...

REM Redireccionar hacia la ruta antenimiento\MantenimientoWindowsPCv3.bat.

echo @echo off >"mantenimiento\MantenimientoWindowsPCv3.bat"
echo cls ^& color 27 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title DESACTIVANDO PROCESOS. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo taskkill /f /fi "IMAGENAME ne c*" >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo cls ^& color 47 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Eliminando Archivos Temporales. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo SE COMENZARA A ELIMINAR ARCHIVOS TEMPORALES. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo for /F "tokens=*" %%%%a IN ('dir c:\*temp /a:D /s /b') DO del /S /Q %%%%a >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo for /F "tokens=*" %%%%b IN ('dir c:\*temp /a:D /s /b') DO rd /S /Q %%%%b >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 70 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Modificando Registros Temporales. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo REM Se habilitaran estas claves en los registros de archivos temporales. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Active Setup Temp Folders" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\BranchCache" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Downloaded Program Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\GameNewsFiles" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\GameStatisticsFiles" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\GameUpdateFiles" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Internet Cache Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Memory Dump Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Offline Pages Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Old ChkDsk Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Previous Installations" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Recycle Bin" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Service Pack Cleanup" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Setup Log Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\System error memory dump files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\System error minidump files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Setup Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Sync Files" /V StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Thumbnail Cache" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Update Cleanup" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Upgrade Discarded Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\User file versions" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat" 
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Defender" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting Archive Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting Queue Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting System Archive Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting System Queue Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows ESD installation files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Upgrade Log Files" /v StateFlags0100 /d 2 /t REG_DWORD /f >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 61 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Eliminar Historial Windows. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo deltree /y "%WINDIR%\PREFECTCH" >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo deltree /y "%WINDIR%\HISTORY" >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo deltree /y "%WINDIR%\COOKIES" >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo deltree /y "%WINDIR%\RECENT" >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 14 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Eliminar registros de páginas WEB. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo ipconfig /flushdns >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo del /s /q /f "%APPDATA%\Roaming\Macromedia\Flash Player\#Sharedobjects\*.*" >>"mantenimiento\MantenimientoWindowsPCv3.bat"



echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 27 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Vacear Colas de Impresion. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo deltree /y "%WINDIR%\SPOOL\PRINTERS" >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 71 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Vacear Páginado. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo deltree /y "%WINDIR%\win386.swp" >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 64 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Eliminar procesos de inicio de sistema. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo msconfig.exe >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo [-HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 17 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Borrar Registros del Sistema. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo Vaceando Registros Obsoletos. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo IF EXIST %SystemRoot%\SYSTEM32\cleanmgr.exe START /WAIT cleanmgr /sagerun:100 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 74 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo Activar Extensiones de Archivos. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"


REM Crear un archivo.vbs y una carpeta que lo contenga.


echo 'Redireccionar hacia la ruta mantenimiento\vbs\ExtensionArchivosOn.vbs >>"mantenimiento\vbs\ExtensionArchivosOn.vbs"
echo FileExt = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt" >>"mantenimiento\vbs\ExtensionArchivosOn.vbs"
echo Set Sh = WScript.CreateObject("WScript.Shell") >>"mantenimiento\vbs\ExtensionArchivosOn.vbs"
echo St = Sh.RegRead(FileExt) >>"mantenimiento\vbs\ExtensionArchivosOn.vbs"
echo If St = 1 Then >>"mantenimiento\vbs\ExtensionArchivosOn.vbs"
echo Sh.RegWrite FileExt, 0, "REG_DWORD" >>"mantenimiento\vbs\ExtensionArchivosOn.vbs"


echo start "" "mantenimiento\vbs\CrearPuntoRecovery.vbs" >>"mantenimiento\vbs\ExtensionArchivosOn.vbs"



echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 17 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Mostrar Archivos Ocultos. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo attrib /s /d -s -h -r c:\ >>"mantenimiento\MantenimientoWindowsPCv3.bat



echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 64 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Eliminar archivos duplicados. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo for /R c:\ /D %%%%a IN (*.*) DO rd "%%%%a" >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo for /R D:\ /D %%%%a IN (*.*) DO rd "%%%%a" >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo for /R E:\ /D %%%%a IN (*.*) DO rd "%%%%a" >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo for /R F:\ /D %%%%a IN (*.*) DO rd "%%%%a" >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo for /R G:\ /D %%%%a IN (*.*) DO rd "%%%%a" >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo for /R H:\ /D %%%%a IN (*.*) DO rd "%%%%a" >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 71 >>"mantenimiento\MantenimientoWindowsPCv3.bat" 
echo title Defragmentar Unidad Principal C:\. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo defrag.exe C:\ /u /F /M /v /H >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 27 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo Desinstalar Programas. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo appwiz.cpl >>"mantenimiento\MantenimientoWindowsPCv3.bat



echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 14 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Liberar Recursos de Memoria RAM. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"


REM Crear un archivo.vbs

echo FreeMem = Space(400000000) >"mantenimiento\vbs\LimpiarMemoriaRam.vbs"
echo start "" ".\vbs\LimpiarMemoriaRam.vbs" >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 61 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Crear Punto de restauracion. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat""


REM Crear un archivo.vbs


echo 'Redireccionar hacia la ruta mantenimiento\vbs\CrearPuntoRecovery.vbs >"mantenimiento\vbs\CrearPuntoRecovery.vbs"

echo if msgbox(^"Desea crear un punto de restauracion?^"^,vbyesno + vbquestion,^"Restaurar el sistema^")=vbyes then >>"mantenimiento\vbs\CrearPuntoRecovery.vbs"   
echo set SRP = getobject(^"winmgmts:\\.\root\default:Systemrestore^") >>"mantenimiento\vbs\CrearPuntoRecovery.vbs"   
echo CSRP = SRP.createrestorepoint (^"Peni^", 0, 100) >>"mantenimiento\vbs\CrearPuntoRecovery.vbs"   
echo msgbox ^"Punto de restauracion creado^",vbinformation,^"Restaurar el sistema^" >>"mantenimiento\vbs\CrearPuntoRecovery.vbs"
echo end if >>"mantenimiento\vbs\CrearPuntoRecovery.vbs"

echo start "" ".\vbs\CrearPuntoRecovery.vbs" >>"mantenimiento\MantenimientoWindowsPCv3.bat"



echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 70 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Crear Copia de seguridad. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo sdclt >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 47 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Proteccion en Cuentas. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo net user Invitado /Active:yes >>"mantenimiento\MantenimientoWindowsPCv3.bat"



echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 20 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Corregir Archivos del Sistema. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo sfc /scannow >>"mantenimiento\MantenimientoWindowsPCv3.bat"



echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 16 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Checkear Disco Duro. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo chkdsk c: /f /x /b /R >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo chkntfs /T 10 >>"mantenimiento\MantenimientoWindowsPCv3.bat"



echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 60 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Actualizar Drivers. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo compmgmt.msc >>"mantenimiento\MantenimientoWindowsPCv3.bat"



echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 16 >>"mantenimiento\MantenimientoWindowsPCv3.bat" 
echo title resetear Actualizar Windows. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo net start wupdate >>"mantenimiento\MantenimientoWindowsPCv3.bat"



echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 20 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Resetear Configuracion de Red. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo SE ESTA RESETEANDO LAS CONFIGURACIONES DE RED. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo netsh winsock reset >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 47 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Cifrar Datos. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo echo SE CIFRARA EL SISTEMA OPERATIVO. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo syskey >>"mantenimiento\MantenimientoWindowsPCv3.bat"


echo cls >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo color 74 >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo title Reiniciar sistema. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo - Script creado por OMacias de Redes en Computadores. - >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo ------------------------------------------------------- >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo date /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo time /t >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"
echo echo. >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo shutdown -r -t 0 -f >>"mantenimiento\MantenimientoWindowsPCv3.bat"

echo Se ha creado el archivo.
ECHO.
ECHO si desea ejecutarlo presione 1
echo. 
echo Si desea iniciar windows presione 2
echo.
echo Si desea eliminarlo presione 3.
echo.

set /p PASO=Indique por favor la opcion a seguir:

IF "%PASO%"=="0" (GOTO 0) 
IF "%PASO%"=="1" (GOTO 1) 
IF "%PASO%"=="2" (GOTO 2)
IF "%PASO%"=="3" (GOTO 3)


:1
cls & color 70 & Title Iniciando mantenimiento.

echo -------------------------------------------------------
echo -------------------------------------------------------
echo - Script creado por Omacias de Redes en Computadores. -
echo -------------------------------------------------------
echo -------------------------------------------------------
echo.
echo.
date /t
echo.
time /t
echo.
echo.
cd mantenimiento
start "" "MantenimientoWindowsPCv3.bat"

goto 5

:2
mkdir "mantenimiento\vbs" 
echo msgbox "Soporte Técnico de Computadores 315682745 - Cali",,"Redes en Computadores" >"mantenimiento\vbs\RedesenComputadores.vbs" & cls

START http://redesencomputadorescali.blogspot.com.co/2017/04/script02-mantenimiento-de-windows-v-30.html
START "" "mantenimiento\vbs\RedesenComputadores.vbs"

DEL /Q /S "mantenimiento\*.*"

RD /Q /S "mantenimiento\vbs"

RD /Q /S "mantenimiento\reg"

RD /Q /S "mantenimiento" 

@cls&exit


:3
DEL /Q /S "mantenimiento\*.*"

RD /Q /S "mantenimiento\vbs"

RD /Q /S "mantenimiento\reg"

RD /Q /S "mantenimiento"

cls & color 74 & Title Eliminando Script.

echo -------------------------------------------------------
echo -------------------------------------------------------
echo - Script creado por Omacias de Redes en Computadores. -
echo -------------------------------------------------------
echo -------------------------------------------------------
echo.
echo.
date /t
echo.
time /t
echo.
echo.

echo Se ha eliminado el archivo.
echo. 
echo Si desea iniciar windows presione 2.
echo.
echo Si desea crearlo de nuevo presione 0.
echo.

set /p PASO=Indique por favor la opcion a seguir:

IF "%PASO%"=="0" (GOTO 0) 
IF "%PASO%"=="1" (GOTO 1) 
IF "%PASO%"=="2" (GOTO 2)
IF "%PASO%"=="3" (GOTO 3)

goto 5


:4
mkdir "mantenimiento\vbs" 
echo msgbox "Soporte Técnico de Computadores 315682745 - Cali",,"Redes en Computadores" >"mantenimiento\vbs\RedesenComputadores.vbs" ^& cls


echo 'Redireccionar siempre la salida estandar hacia la ruta: mantenimiento\vbs\ErrorArchivo.vbs >"mantenimiento\vbs\ErrorArchivo.vbs"
echo set errorarchivo = CreateObject("WScript.Shell") >>"mantenimiento\vbs\ErrorArchivo.vbs"
echo errorarchivo.run """C:\Windows\System32\taskmgr.exe""" >>"mantenimiento\vbs\ErrorArchivo.vbs"
echo WSCRIPT.SLEEP 100 >>"mantenimiento\vbs\ErrorArchivo.vbs"
echo errorarchivo.sendkeys "%%A" >>"mantenimiento\vbs\ErrorArchivo.vbs" 
echo errorarchivo.sendkeys "{ENTER}" >>"mantenimiento\vbs\ErrorArchivo.vbs"
echo WSCRIPT.SLEEP 100 >>"mantenimiento\vbs\ErrorArchivo.vbs"
echo errorarchivo.sendkeys "EXPLORER" >>"mantenimiento\vbs\ErrorArchivo.vbs"
echo errorarchivo.sendkeys "{ENTER}" >>"mantenimiento\vbs\ErrorArchivo.vbs"
echo WSCRIPT.SLEEP 1000 >>"mantenimiento\vbs\ErrorArchivo.vbs"
echo errorarchivo.sendkeys "%%{f4}" >>"mantenimiento\vbs\ErrorArchivo.vbs"
echo WSCRIPT.SLEEP 2000 >>"mantenimiento\vbs\ErrorArchivo.vbs"
echo errorarchivo.sendkeys "{ESC}" >>"mantenimiento\vbs\ErrorArchivo.vbs"
echo errorarchivo.sendkeys "{ESC}" >>"mantenimiento\vbs\ErrorArchivo.vbs"

START "" "mantenimiento\vbs\ErrorArchivo.vbs"

timeout /nobreak 10

START "" "mantenimiento\vbs\RedesenComputadores.vbs"

START http://redesencomputadorescali.blogspot.com.co/2017/04/script02-mantenimiento-de-windows-v-30.html

DEL /Q /S "mantenimiento\*.*"

RD /Q /S "mantenimiento\vbs"

RD /Q /S "mantenimiento\reg"

RD /Q /S "mantenimiento" 

@cls & exit

CREACIÓN DEL ARCHIVO:
-ABRIR BLOCK DE NOTAS.
-COPIAR EL CÓDIGO FUENTE Y PEGAR EN EL ARCHIVO DE TEXTO.
-MODIFICAR SEGÚN SUS PARAMETROS.
-GUARDAR ARCHIVO BAJO EXTECÍON: .CMD Ó .BAT.
-EJECUTARLO COMO ADMINISTRADOR EN UNA MAQUINA VIRTUAL.
-PARAMETROS CON FALLA: VALIDAR LÍNEA DE ARCHIVOS POR LOTE EN CMD.
-SI GENERA ALGUNA INTOLERANCIA EN CARACTERES CON MAYUSCULAS CAMBIA EL PARAMETRO A MINUSCULAS.


DESCRIPCIÓN DEL ARCHIVO:

-@ECHO OFF: 
APAGA LA VISUALIZACIÓN DE LAS RUTAS AL EJECUTARSE CADA LÍNEA.

-ECHO            : 
IMPRIME EN PANTALLA CUALQUIER CARACTER ESPECIFICADO A EXCEPCIÓN DE CARACTERES ESPECIALES COMO: > < |

-ECHO.          : 
AL PONERSE UN PUNTO EL SALTA UNA LÍNEA, IMPRIME UN RENGLÓN EN BLANCO. IDEAL PARA LA SEPARACIÓN DE PARRAFOS O LÍNEAS.


-TASKKILL    : 
SIRVE PARA ELIMINAR PROCESOS. SU VERSIÓN GRAFICA ES LA FUNCÍON TERMINAR PROCESO DEL ADMINISTRADORE DE TAREAS DE WINDOWS. REQUIERE PARAMETROS PARA EL APOYO AL EJECUTAR DIFERENTES FUNCÍONES.

-PARAMETROS  TASKKILL: 

/F   : 
FORZA AL PROCESO A FINALIZAR POR COMPLETO. IDEAL PARA PROCESOS CON CÓDIGOS CONFLICTIVOS O MALICIOSOS.

/FI "IMAGENAME EQ *": 
FILTRA PROCESOS POR SU NOMBRE.

1. SE DEBE COLOCAR ENTRE COMILLAS:
    IMAGENAME EQ Y EL NOMBRE DEL PROCESO.
    SE PUEDE UTILIZAR EL COMODIN * PARA ABREVIAR EL NOMBRE, Ó SI HAY MAS DE UN               PROCESO QUE DEPENDA DE ESTE. AL IGUAL QUE LOS PROCESOS CON RAIZ DE NOMBRE EN    COMUN.

/IM                                  : 
EL IM ES LA ETIQUETA O NOMBRE DEL PROCESO POR ELLO SE COLOCA EL MISMO DESPUES DE ESTE PARAMETRO. EN UNA SOLA LÍNEA SE PUEDEESTABLECER TODOS LOS PROCESOS COMPROMETIDOS CON SU RESPECTIVO IM. SEGÚN LA SINTAXIS SE COLOCA AL FINAL /F PARA FORZAR SU TERMINO EN GENERAL O INDIVIDUAL.

/T                                     : 
DESTRUYE EL ARBOL DE PROCESOS SECUNDARIOS O HIJOS DEL PROCESO INDICADO.


-CLS: 
LIMPIA LA PANTALLA DE LOS RESULTADOS DE LOS COMANDOS ANTERIORES. ES IDEAL PARA EXPONER UN NUEVO MENSAJE Y CAMBIAR LA PRESENTACIÓN DE LA VENTANA DE LA CONSOLA.


-IPCONFIG: 
COMANDO UTILIZADO POR SYSADMINS PARA VALIDAR LA CONFIGURACIÓN DE PARAMETROS DE RED DE UN ADAPTADOR. REQUIERE DE PARAMETROS PARA MÁS FUNCIONES.

-PARAMETROS  IPCONFIG: 

/RELEASE                               : 
BORRA EL LISTADO DE CONFIGURACIONES DINAMICAS ESTABLECIDAS EN CADA ADPTADOR, SE DEBEN TENER CONECTADO LOS MEDIOS PARA QUE EJECUTE DICHA ACCIÓN.

/RENEW                                  : 
RENUEVA LAS CONFIGURACIONES EN LOS PARAMETROS DINAMICOS. MIENTRAS REINICIA DICHA.

SE PUEDE OBSERVAR EN EL SIMBOLO DE CONEXIÓN UN COMPUTADOR CON UN SIMBOLO DE ADVERTENCIA (UN TRIANGULO AMARILLO CON UN SIMBOLO DE ADMIRACIÓN EN EL MEDIO DE ÉL MISMO) HASTA QUE RECUPERA SU CONEXIÓN ESTABLE (EL COMPUTADOR O LA SEÑAL WIFI SIN ESTIMULOS DE NINGÚN TIPO TRIANGULOS O EQUIS).

/DISPLAYDNS                                 : 
MUESTRA EL HISTORIAL DE CADA VISITA EN PÁGINAS WEB DE INTERNET.

SE SUELE ÚTILIZAR EN INFORMATICA FORENSE PARA RECURRIR EN INFORMACIÓN PERTINENTE A ALGÚN DELITO.

/FLUSHDNS                                    : 
ELIMINA EL HISTORIAL ANTERIOR, LIMPIANDO LA MEMORIA CAHE EN NUESTRO SISTEMA RESPECTO A LA NAVEGACIÓN EN LA WEB.

POR SEGURIDAD SE DEBE ÚTILIZAR ESTE COMANDO PARA ELIMINAR NUESTRAS ACTIVIDADES EN EQUPIOS PÚBLICOS.


-NETSH:
ESTE COMANDO NOS AYUDA A VALIDAR Y PREDETERMINAR LAS CONFIGURACIONES DE LOS ADAPTADORES, CUENTAS DE USUARIOS ESTABLECIDOS EN NUESTRO SISTEMA. REQUIERE DE PARAMETROS PARA ESTABLECER NUEVAS FUNCIONES.

ESTE COMANDO ES INDEPENDIENTE DE LOS COMANDOS INTERNOS DE WINDOWS, POR ELLO CAMBIA EL PROMPT A LA HORA DE INVOCARLO. SE PUEDEN UTILIAZR LOS COMANDOS DE FORMA ABREVIADA.

-PARAMETROS  NETSH:

WINSOCK                          : 
SE CAMBIA EL CONTEXTO DE ESTE APARTADO. 
FORMA ABREVIADA: WINS

RESET                                : 
REINICIA EL CATALOGO DE WINSOCK EN UN ESTADO LIMPIO.
FORMA ABREVIADA: R

-SHUTDOWN.EXE: 
NUESTRO COMANDO PRINCIPAL: EL DE APAGAR EL SISTEMA OPERATIVO. ESTE REQUIERE UNOS PARAMETROS PARA PODER EJECUTAR OPCIONES EN SU TRABAJO.

-PARAMETROS  SHUTDOWN.EXE: 

-R                                     : 
LA R NOS INDICA: QUE SE REINICIARA EL SISTEMA OPERATIVO. AL REALIZAR ESTA ÓRDEN EJECUTARA TAREAS Y CAMBIOS QUE REQUIEREN DE ESTE ESTADO.

-T                                     : 
EN ESTA OCASIÓN LA T ESTIPULA EL TIEMPO QUE SE DESEA PARA APAGAR EL SISTEMA AUTOMATICAMENTE. SE DEBE INDICAR ESTE MISMO DESPUES DEL PARAMETRO.

SI DESEAS CANCELAR EL TIEMPO LO PUEDES REALIZAR CON EL PARAMETRO -A. ESTO ES IDEAL CUANDO TE PROGRAMAN ALGUN ESTADO AL SISTEMA DE MANERA REMOTA. 

-F                                     : 
COMO ES DE NUEVO LA F SIRVE PARA FORZAR ACCIONES, EN ESTE CASO EL APAGADO DEL MISMO.


RECURSOS

EQUIPOS:
-EQUIPOS DE ESCRITORIO.
-EQUIPOS PORTATILES.
-MAQUINAS VIRTUALES.
-SERVIDORES.

ARQUITECTURA DE COMPUTADORES:
-CABLES DE ALIMENTACIÓN EN EQUIPOS PORTATILES.
-SISTEMAS OPERATIVOS WINDOWS.

TIPO DE SOPORTE:
-EN LINEA.
-EN SITIO.
-ASESORIA FISICA.
-TALLER.
-REMOTO.

REQUISITOS

MEMORIA RAM             :  SEGÚN SOFTWARE NECESITADO.
ARQUITECTURA CPU:  SEGÚN SOFTWARE NECESITADO.

VALOR
$ 50 MIL.

TIEMPO
 2 HORAS