Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set oWSH = CreateObject("WScript.Shell")
- Set oNET = CreateObject("WScript.Network")
- Set oAPP = CreateObject("Shell.Application")
- Set oFSO = CreateObject("Scripting.FileSystemObject")
- Set oWMI = GetObject("winmgmts:\\.\root\CIMV2")
- Set oARG = WScript.Arguments
- Call ForceConsole()
- Call showBanner()
- Call checkW10()
- Call runElevated()
- Call printf(" Requisitos OK...")
- Call showMenu()
- Function printf(txt)
- WScript.StdOut.WriteLine txt
- End Function
- Function printl(txt)
- WScript.StdOut.Write txt
- End Function
- Function scanf()
- scanf = LCase(WScript.StdIn.ReadLine)
- End Function
- Function Wait(n)
- WScript.Sleep Int(n * 1000)
- End Function
- Function ForceConsole()
- If InStr(LCase(WScript.FullName), "cscript.exe") = 0 Then
- oWSH.Run "cscript //NoLogo " & Chr(34) & WScript.ScriptFullName & Chr(34)
- WScript.Quit
- End If
- End Function
- Function showBanner()
- printf ""
- printf " #############################"
- printf " # #"
- printf " # WINDOWS 10 SCRIPT TWEAKER #"
- printf " # by AikonCWD #"
- printf " # v2.0 #"
- printf " #############################"
- printf ""
- printf " Comprobando requisitos del sistema..."
- End Function
- Function checkW10()
- If getNTversion < 10 Then
- printf " ERROR: Necesitas ejecutar este script bajo Windows 10"
- printf ""
- printf " Press <enter> to quit"
- scanf
- WScript.Quit
- End IF
- End Function
- Function runElevated()
- If isUACRequired Then
- If Not isElevated Then RunAsUAC
- Else
- If Not isAdmin Then
- printf " ERROR: Necesitas ejecutar este script como Administrador!"
- printf ""
- printf " Press <enter> to quit"
- scanf
- WScript.Quit
- End If
- End If
- End Function
- Function isUACRequired()
- r = isUAC()
- If r Then
- intUAC = oWSH.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA")
- r = 1 = intUAC
- End If
- isUACRequired = r
- End Function
- Function isElevated()
- isElevated = CheckCredential("S-1-16-12288")
- End Function
- Function isAdmin()
- isAdmin = CheckCredential("S-1-5-32-544")
- End Function
- Function CheckCredential(p)
- Set oWhoAmI = oWSH.Exec("whoami /groups")
- Set WhoAmIO = oWhoAmI.StdOut
- WhoAmIO = WhoAmIO.ReadAll
- CheckCredential = InStr(WhoAmIO, p) > 0
- End Function
- Function RunAsUAC()
- If isUAC Then
- printf ""
- printf " El script necesita ejecutarse con permisos elevados..."
- printf " acepta el siguiente mensaje:"
- Wait(2)
- oAPP.ShellExecute "cscript", "//NoLogo " & Chr(34) & WScript.ScriptFullName & Chr(34), "", "runas", 1
- WScript.Quit
- End If
- End Function
- Function isUAC()
- Set cWin = oWMI.ExecQuery("SELECT * FROM Win32_OperatingSystem")
- r = False
- For Each OS In cWin
- If Split(OS.Version,".")(0) > 5 Then
- r = True
- Else
- r = False
- End If
- Next
- isUAC = r
- End Function
- Function getNTversion()
- Set cWin = oWMI.ExecQuery("SELECT * FROM Win32_OperatingSystem")
- For Each OS In cWin
- getNTversion = Split(OS.Version,".")(0)
- Next
- End Function
- Function cls()
- For i = 1 To 100
- printf ""
- Next
- End Function
- Function showMenu()
- Wait(2)
- cls
- printf " #############################"
- printf " # #"
- printf " # WINDOWS 10 SCRIPT TWEAKER #"
- printf " # by AikonCWD #"
- printf " # v2.0 #"
- printf " #############################"
- printf ""
- printf ""
- printf " Selecciona una opcion:"
- printf ""
- printf " 1 = Habilitar icono en escritorio: Modo Dios"
- printf " 2 = Deshabilitar Control de Cuentas de Usuario (UAC)"
- printf " 3 = Ejecutar limpiador de Windows. Libera espacio y borrar Windows.old"
- printf " 4 = Habilitar/Deshabilitar inicio de sesion sin password"
- printf " 5 = Mostrar web con combinacion de teclas utiles en Win10"
- printf " 6 = Instalar/Desinstalar caracteristicas de Windows"
- printf ""
- printf " 7 = Impedir que Microsoft recopile informacion de este equipo"
- printf " 8 = Desinstalar Metro Apps pre-instaladas en Windows 10"
- printf " 9 = Deshabilitar OneDrive"
- printf " 10 = Deshabilitar Windows Defender"
- printf ""
- printf " 11 = Optimizar y prolongar la vida de tu disco duro SSD"
- printf ""
- printf " 12 = Mostrar estado de la activacion de Windows 10"
- printf " 13 = Activar Windows 10: Ejecutar slmgr /ato 30 veces seguidas"
- printf ""
- printf " 0 = Salir"
- printf ""
- printl " > "
- RP = scanf
- If Not isNumeric(RP) = True Then
- printf ""
- printf " ERROR: Opcion invalida, solo se permiten numero..."
- Call showMenu()
- Exit Function
- End If
- Select Case RP
- Case 1
- Call createGodMode()
- Case 2
- Call disableUAC()
- Case 3
- Call cleanSO()
- Case 4
- Call noPWD()
- Case 5
- Call showKeyboardTips()
- Case 6
- Call optionalFeatures()
- Case 7
- Call disableSpyware()
- Case 8
- Call cleanApps()
- Case 9
- Call disableOneDrive()
- Case 10
- Call disableDefender()
- Case 11
- Call powerSSD()
- Case 12
- Call showActivation()
- Case 13
- Call activate30()
- Case 0
- printf ""
- printf " Gracias por utilizar mi script"
- printf " AikonCWD dice adios!! ;D"
- wait(2)
- WScript.Quit
- Case Else
- printf ""
- printf " INFO: Opcion invalida, ese numero no esta disponible"
- Call showMenu()
- Exit Function
- End Select
- End Function
- Function createGodMode()
- godFolder = oWSH.SpecialFolders("Desktop") & "\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}"
- If oFSO.FolderExists(godFolder) = False Then
- oFSO.CreateFolder(godFolder)
- printf ""
- printf " INFO: Se ha creado un acceso directo en tu escritorio"
- Call showMenu
- Else
- printf ""
- printf " INFO: Ya existe el modo dios, ejecutalo desde tu Escritorio"
- call showMenu
- End If
- End Function
- Function disableUAC()
- printf ""
- printf " Ahora se ejecutara una ventana..."
- printf " Mueve la barra vertical hasta el nivel mas bajo"
- printf " Acepta los cambios y reinicia el ordenador"
- wait(2)
- printf ""
- printf " INFO: Executing UserAccountControlSettings.exe"
- oWSH.Run "UserAccountControlSettings.exe"
- Call showMenu
- End Function
- Function cleanSO()
- printf ""
- printf " Ahora se ejecutara una ventana..."
- printf " Marca las opciones deseadas de limpieza"
- printf " Acepta los cambios y reinicia el ordenador"
- wait(2)
- printf ""
- printf " INFO: Executing cleanmgr.exe"
- oWSH.Run "cleanmgr.exe"
- Call showMenu
- End Function
- Function noPWD()
- printf ""
- printf " Ahora se ejecutara una ventana..."
- printf " Desmarca la opcion: Los usuarios deben escribir su nombre y password para usar el equipo"
- printf " Acepta los cambios y reinicia el ordenador"
- wait(2)
- printf ""
- printf " INFO: Executing control userpasswords2"
- oWSH.Run "control userpasswords2"
- Call showMenu
- End Function
- Function optionalFeatures()
- printf ""
- printf " Ahora se ejecutara una ventana..."
- printf " Marca/Desmarca las opciones deseadas"
- printf " Acepta los cambios y reinicia el ordenador"
- wait(2)
- printf ""
- printf " INFO: Executing optionalfeatures.exe"
- oWSH.Run "optionalfeatures.exe"
- Call showMenu
- End Function
- Function showKeyboardTips()
- printf ""
- printf " Ahora se ejecutara una pagina web..."
- printf " En ella encontraras todas las combinaciones de teclas utiles en Win10"
- wait(2)
- printf ""
- printf " INFO: Executing web-browser"
- oWSH.Run "http://reviews.gizmodo.com/the-ultimate-guide-to-windows-10-keyboard-shortcuts-1720656591"
- Call showMenu
- End Function
- Function disableSpyware()
- printf ""
- printf " Deshabilitando Telemetry usando el registro..."
- wait(1)
- oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection\AllowTelemetry", 0, "REG_DWORD"
- oWSH.RegWrite "HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\DataCollection\AllowTelemetry", 0, "REG_DWORD"
- printf ""
- printf " INFO: Telemetry deshabilitado correctamente"
- pathLOG = oWSH.ExpandEnvironmentStrings("ProgramData") & "\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl"
- printf ""
- printf " Borrando DiagTrack Log..."
- wait(1)
- If oFSO.FileExists(pathLOG) Then oFSO.DeleteFile(pathLOG)
- printf ""
- printf " INFO: DiagTrack Log borrado correctamente"
- printf ""
- printf " Deshabilitando servicios de seguimiento..."
- wait(1)
- oWSH.Run "sc stop DiagTrack"
- oWSH.Run "sc stop RetailDemo"
- oWSH.Run "sc stop dmwappushservice"
- oWSH.Run "sc config DiagTrack start=disabled"
- oWSH.Run "sc config RetailDemo start=disabled"
- oWSH.Run "sc config dmwappushservice start=disabled"
- printf ""
- printf " INFO: Servicios de seguimiento deshabilitados"
- printf ""
- printf " Deshabilitando tareas programadas que envian datos a Microsoft..."
- oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" & chr(34) & " /DISABLE"
- oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Application Experience\ProgramDataUpdater" & chr(34) & " /DISABLE"
- oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" & chr(34) & " /DISABLE"
- oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" & chr(34) & " /DISABLE"
- oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Customer Experience Improvement Program\Uploader" & chr(34) & " /DISABLE"
- oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" & chr(34) & " /DISABLE"
- printf ""
- printf " INFO: Tareas programadas de seguimiento deshabilitadas"
- printf ""
- printf " Deshabilitando acceso a los servidores de publicidad de Microsoft..."
- wait(1)
- Set F = oFSO.CreateTextFIle("C:\Windows\System32\drivers\etc\hosts", True)
- F.WriteLine "127.0.0.1 localhost"
- F.WriteLine "127.0.0.1 localhost.localdomain"
- F.WriteLine "255.255.255.255 broadcasthost"
- F.WriteLine "::1 localhost"
- F.WriteLine "127.0.0.1 local"
- F.WriteLine "0.0.0.0 vortex.data.microsoft.com"
- F.WriteLine "0.0.0.0 vortex-win.data.microsoft.com"
- F.WriteLine "0.0.0.0 telecommand.telemetry.microsoft.com"
- F.WriteLine "0.0.0.0 telecommand.telemetry.microsoft.com.nsatc.net"
- F.WriteLine "0.0.0.0 oca.telemetry.microsoft.com"
- F.WriteLine "0.0.0.0 oca.telemetry.microsoft.com.nsatc.net"
- F.WriteLine "0.0.0.0 sqm.telemetry.microsoft.com"
- F.WriteLine "0.0.0.0 sqm.telemetry.microsoft.com.nsatc.net"
- F.WriteLine "0.0.0.0 watson.telemetry.microsoft.com"
- F.WriteLine "0.0.0.0 watson.telemetry.microsoft.com.nsatc.net"
- F.WriteLine "0.0.0.0 redir.metaservices.microsoft.com"
- F.WriteLine "0.0.0.0 choice.microsoft.com"
- F.WriteLine "0.0.0.0 choice.microsoft.com.nsatc.net"
- F.WriteLine "0.0.0.0 df.telemetry.microsoft.com"
- F.WriteLine "0.0.0.0 reports.wes.df.telemetry.microsoft.com"
- F.WriteLine "0.0.0.0 wes.df.telemetry.microsoft.com"
- F.WriteLine "0.0.0.0 services.wes.df.telemetry.microsoft.com"
- F.WriteLine "0.0.0.0 sqm.df.telemetry.microsoft.com"
- F.WriteLine "0.0.0.0 telemetry.microsoft.com"
- F.WriteLine "0.0.0.0 watson.ppe.telemetry.microsoft.com"
- F.WriteLine "0.0.0.0 telemetry.appex.bing.net"
- F.WriteLine "0.0.0.0 telemetry.urs.microsoft.com"
- F.WriteLine "0.0.0.0 telemetry.appex.bing.net:443"
- F.WriteLine "0.0.0.0 settings-sandbox.data.microsoft.com"
- F.WriteLine "0.0.0.0 vortex-sandbox.data.microsoft.com"
- F.WriteLine "0.0.0.0 survey.watson.microsoft.com"
- F.WriteLine "0.0.0.0 watson.live.com"
- F.WriteLine "0.0.0.0 watson.microsoft.com"
- F.WriteLine "0.0.0.0 statsfe2.ws.microsoft.com"
- F.WriteLine "0.0.0.0 corpext.msitadfs.glbdns2.microsoft.com"
- F.WriteLine "0.0.0.0 compatexchange.cloudapp.net"
- F.WriteLine "0.0.0.0 cs1.wpc.v0cdn.net"
- F.WriteLine "0.0.0.0 a-0001.a-msedge.net"
- F.WriteLine "0.0.0.0 statsfe2.update.microsoft.com.akadns.net"
- F.WriteLine "0.0.0.0 sls.update.microsoft.com.akadns.net"
- F.WriteLine "0.0.0.0 fe2.update.microsoft.com.akadns.net"
- F.WriteLine "0.0.0.0 65.55.108.23 "
- F.WriteLine "0.0.0.0 65.39.117.230"
- F.WriteLine "0.0.0.0 23.218.212.69 "
- F.WriteLine "0.0.0.0 134.170.30.202"
- F.WriteLine "0.0.0.0 137.116.81.24"
- F.WriteLine "0.0.0.0 diagnostics.support.microsoft.com"
- F.WriteLine "0.0.0.0 corp.sts.microsoft.com"
- F.WriteLine "0.0.0.0 statsfe1.ws.microsoft.com"
- F.WriteLine "0.0.0.0 pre.footprintpredict.com"
- F.WriteLine "0.0.0.0 204.79.197.200"
- F.WriteLine "0.0.0.0 23.218.212.69"
- F.WriteLine "0.0.0.0 i1.services.social.microsoft.com"
- F.WriteLine "0.0.0.0 i1.services.social.microsoft.com.nsatc.net"
- F.WriteLine "0.0.0.0 feedback.windows.com"
- F.WriteLine "0.0.0.0 feedback.microsoft-hohm.com"
- F.WriteLine "0.0.0.0 feedback.search.microsoft.com"
- F.Close
- printf ""
- printf " INFO: Fichero HOSTS escrito correctamente"
- Call showMenu
- End Function
- Function disableOneDrive()
- printf ""
- printf " Deshabilitando OneDrive usando el registro..."
- wait(1)
- oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive\DisableFileSyncNGSC", 1, "REG_DWORD"
- oWSH.RegWrite "HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive\DisableFileSyncNGSC", 1, "REG_DWORD"
- printf ""
- printf " INFO: OneDrive deshabilitado correctamente"
- Call showMenu
- End Function
- Function disableDefender()
- printf ""
- printf " Deshabilitando Windows Defender usando el registro..."
- wait(1)
- oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\DisableAntiSpyware", 1, "REG_DWORD"
- oWSH.RegWrite "HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender\DisableAntiSpyware", 1, "REG_DWORD"
- printf ""
- printf " INFO: Windows Defender deshabilitado correctamente"
- printf " WARNING: Si no tienes antivirus, te recomiendo 360 Total Security: www.360totalsecurity.com"
- wait(1)
- Call showMenu
- End Function
- Function showActivation()
- printf ""
- printf " En unos segundos aparecera el estado de tu activacion..."
- wait(1)
- oWSH.Run "slmgr.vbs /dlv"
- oWSH.Run "slmgr.vbs /xpr"
- printf ""
- printf " INFO: Script slmgr ejecutado correctamente"
- Call showMenu
- End Function
- Function activate30()
- printf ""
- printf " Esta funcion sirve para forzar la activacion de Windows 10"
- printf " solo se debe utilizar si tienes problemas para validar la licencia"
- printf ""
- printl " El proceso demora varios minutos. Deseas continuar? (s/n) "
- If scanf <> "s" Then
- printf ""
- printf " INFO: Proceso cancelado por el usuario"
- wait(1)
- Call showMenu
- Exit Function
- End If
- printf " Se va a ejecutar slmgr /ato 30 veces, sea paciente..."
- wait(1)
- For i = 1 To 30
- printf " > (" & i & ") Ejecutando slmgr.vbs /ato"
- oWSH.Run "slmgr.vbs /ato"
- Next
- printf ""
- printf " INFO: Script slmgr ejecutado correctamente"
- printf " INFO: El resultado tarda unos segundos en aparecer, espere..."
- wait(1)
- Call showMenu
- End Function
- Function cleanApps()
- printf ""
- printf " Este script va a desinstalar el siguiente listado de Apps:"
- printf ""
- printf " > Bing"
- printf " > Zune"
- printf " > Skype"
- printf " > XboxApp"
- printf " > OneNote"
- printf " > 3DBuilder"
- printf " > Getstarted"
- printf " > Windows Maps"
- printf " > Windows Phone"
- printf " > Windows Camera"
- printf " > Windows Alarms"
- printf " > Windows Sound Recorder"
- printf " > Windows Communications Apps"
- printf " > Microsoft People"
- printf " > Microsoft Office Hub"
- printf " > Microsoft Solitaire Collection"
- printf ""
- printl " La opcion no es reversible. Deseas continuar? (s/n) "
- If scanf = "s" Then
- oWSH.Run "powershell get-appxpackage -Name *Bing* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *Zune* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *XboxApp* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *OneNote* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *SkypeApp* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *3DBuilder* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *Getstarted* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *Microsoft.People* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *MicrosoftOfficeHub* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *MicrosoftSolitaireCollection* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *WindowsCamera* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *WindowsAlarms* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *WindowsMaps* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *WindowsPhone* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *WindowsSoundRecorder* | Remove-AppxPackage", 1, True
- oWSH.Run "powershell get-appxpackage -Name *windowscommunicationsapps* | Remove-AppxPackage", 1, True
- printf ""
- printf " INFO: Las Apps se han desinstalado correctamente..."
- Else
- printf ""
- printf " INFO: Operacion cancelada por el usuario"
- End If
- wait(1)
- Call showMenu
- End Function
- Function powerSSD()
- printf ""
- printf " Este script va a modificar las siguientes configuraciones:"
- printf ""
- printf " > Habilitar TRIM"
- printf " > Deshabilitar VSS (Shadow Copy)"
- printf " > Deshabilitar Windows Search + Indexing Service"
- printf " > Deshabilitar defragmentador de discos"
- printf " > Deshabilitar hibernacion del sistema"
- printf " > Deshabilitar Prefetcher + Superfetch"
- printf " > Deshabilitar ClearPageFileAtShutdown + LargeSystemCache"
- printf ""
- printl " Deseas continuar? (s/n) "
- If scanf = "s" Then
- printf ""
- oWSH.Run "fsutil behavior set disabledeletenotify 0"
- printf " # TRIM habilitado"
- wait(1)
- oWSH.Run "vssadmin Delete Shadows /All /Quiet"
- oWSH.Run "sc stop VSS"
- oWSH.Run "sc config VSS start=disabled"
- printf " # Shadow Copy eliminada y deshabilitada"
- wait(1)
- oWSH.Run "sc stop WSearch"
- oWSH.Run "sc config WSearch start=disabled"
- printf " # Windows Search + Indexing Service deshabilitados"
- wait(1)
- oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Defrag\ScheduledDefrag" & chr(34) & " /DISABLE"
- printf " # Defragmentador de disco deshabilitado"
- wait(1)
- oWSH.Run "powercfg -h off"
- printf " # Hibernacion deshabilitada"
- wait(1)
- oWSH.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters\EnablePrefetcher", 0, "REG_DWORD"
- oWSH.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters\EnableSuperfetch", 0, "REG_DWORD"
- oWSH.Run "sc stop SysMain"
- oWSH.Run "sc config SysMain start=disabled"
- printf " # Prefetcher + Superfetch deshabilitados"
- wait(1)
- oWSH.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\ClearPageFileAtShutdown", 0, "REG_DWORD"
- oWSH.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache", 0, "REG_DWORD"
- printf " # ClearPageFileAtShutdown + LargeSystemCache deshabilitados"
- wait(1)
- printf ""
- printf " INFO: Felicidades, acabas de prolongar la vida y el rendimiento de tu SSD"
- Else
- printf ""
- printf " INFO: Operacion cancelada por el usuario"
- End If
- wait(1)
- Call showMenu
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement