Advertisement
Guest User

Windows 10 Script

a guest
Aug 10th, 2015
1,369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Set oWSH = CreateObject("WScript.Shell")
  2. Set oNET = CreateObject("WScript.Network")
  3. Set oAPP = CreateObject("Shell.Application")
  4. Set oFSO = CreateObject("Scripting.FileSystemObject")
  5. Set oWMI = GetObject("winmgmts:\\.\root\CIMV2")
  6. Set oARG = WScript.Arguments
  7.  
  8. Call ForceConsole()
  9. Call showBanner()
  10. Call checkW10()
  11. Call runElevated()
  12. Call printf(" Requisitos OK...")
  13. Call showMenu()
  14.  
  15. Function printf(txt)
  16.     WScript.StdOut.WriteLine txt
  17. End Function
  18.  
  19. Function printl(txt)
  20.     WScript.StdOut.Write txt
  21. End Function
  22.  
  23. Function scanf()
  24.     scanf = LCase(WScript.StdIn.ReadLine)
  25. End Function
  26.  
  27. Function Wait(n)
  28.     WScript.Sleep Int(n * 1000)
  29. End Function
  30.  
  31. Function ForceConsole()
  32.     If InStr(LCase(WScript.FullName), "cscript.exe") = 0 Then
  33.         oWSH.Run "cscript //NoLogo " & Chr(34) & WScript.ScriptFullName & Chr(34)
  34.         WScript.Quit
  35.     End If
  36. End Function
  37.  
  38. Function showBanner()
  39.     printf ""
  40.     printf " #############################"
  41.     printf " #                           #"
  42.     printf " # WINDOWS 10 SCRIPT TWEAKER #"
  43.     printf " # by AikonCWD               #"
  44.     printf " #                      v2.0 #"
  45.     printf " #############################"
  46.     printf ""
  47.     printf " Comprobando requisitos del sistema..."
  48. End Function
  49.  
  50. Function checkW10()
  51.     If getNTversion < 10 Then
  52.         printf " ERROR: Necesitas ejecutar este script bajo Windows 10"
  53.         printf ""
  54.         printf " Press <enter> to quit"
  55.         scanf
  56.         WScript.Quit
  57.     End IF
  58. End Function
  59.  
  60. Function runElevated()
  61.     If isUACRequired Then
  62.         If Not isElevated Then RunAsUAC
  63.     Else
  64.         If Not isAdmin Then
  65.             printf " ERROR: Necesitas ejecutar este script como Administrador!"
  66.             printf ""
  67.             printf " Press <enter> to quit"
  68.             scanf
  69.             WScript.Quit
  70.         End If
  71.     End If
  72. End Function
  73.  
  74. Function isUACRequired()
  75.     r = isUAC()
  76.     If r Then
  77.         intUAC = oWSH.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA")
  78.         r = 1 = intUAC
  79.     End If
  80.     isUACRequired = r
  81. End Function
  82.  
  83. Function isElevated()
  84.     isElevated = CheckCredential("S-1-16-12288")
  85. End Function
  86.  
  87. Function isAdmin()
  88.     isAdmin = CheckCredential("S-1-5-32-544")
  89. End Function
  90.  
  91. Function CheckCredential(p)
  92.     Set oWhoAmI = oWSH.Exec("whoami /groups")
  93.     Set WhoAmIO = oWhoAmI.StdOut
  94.     WhoAmIO = WhoAmIO.ReadAll
  95.     CheckCredential = InStr(WhoAmIO, p) > 0
  96. End Function
  97.  
  98. Function RunAsUAC()
  99.     If isUAC Then
  100.         printf ""
  101.         printf " El script necesita ejecutarse con permisos elevados..."
  102.         printf " acepta el siguiente mensaje:"
  103.         Wait(2)
  104.         oAPP.ShellExecute "cscript", "//NoLogo " & Chr(34) & WScript.ScriptFullName & Chr(34), "", "runas", 1
  105.         WScript.Quit
  106.     End If
  107. End Function
  108.  
  109. Function isUAC()
  110.     Set cWin = oWMI.ExecQuery("SELECT * FROM Win32_OperatingSystem")
  111.     r = False
  112.     For Each OS In cWin
  113.         If Split(OS.Version,".")(0) > 5 Then
  114.             r = True
  115.         Else
  116.             r = False
  117.         End If
  118.     Next
  119.     isUAC = r
  120. End Function
  121.  
  122. Function getNTversion()
  123.     Set cWin = oWMI.ExecQuery("SELECT * FROM Win32_OperatingSystem")
  124.     For Each OS In cWin
  125.         getNTversion = Split(OS.Version,".")(0)
  126.     Next
  127. End Function
  128.  
  129. Function cls()
  130.     For i = 1 To 100
  131.         printf ""
  132.     Next
  133. End Function
  134.  
  135. Function showMenu()
  136.     Wait(2)
  137.     cls
  138.     printf " #############################"
  139.     printf " #                           #"
  140.     printf " # WINDOWS 10 SCRIPT TWEAKER #"
  141.     printf " # by AikonCWD               #"
  142.     printf " #                      v2.0 #"
  143.     printf " #############################"
  144.     printf ""
  145.     printf ""
  146.     printf " Selecciona una opcion:"
  147.     printf ""
  148.     printf "   1 = Habilitar icono en escritorio: Modo Dios"
  149.     printf "   2 = Deshabilitar Control de Cuentas de Usuario (UAC)"
  150.     printf "   3 = Ejecutar limpiador de Windows. Libera espacio y borrar Windows.old"
  151.     printf "   4 = Habilitar/Deshabilitar inicio de sesion sin password"
  152.     printf "   5 = Mostrar web con combinacion de teclas utiles en Win10"
  153.     printf "   6 = Instalar/Desinstalar caracteristicas de Windows"
  154.     printf ""
  155.     printf "   7 = Impedir que Microsoft recopile informacion de este equipo"
  156.     printf "   8 = Desinstalar Metro Apps pre-instaladas en Windows 10"
  157.     printf "   9 = Deshabilitar OneDrive"
  158.     printf "  10 = Deshabilitar Windows Defender"
  159.     printf ""
  160.     printf "  11 = Optimizar y prolongar la vida de tu disco duro SSD"
  161.     printf ""
  162.     printf "  12 = Mostrar estado de la activacion de Windows 10"
  163.     printf "  13 = Activar Windows 10: Ejecutar slmgr /ato 30 veces seguidas"
  164.     printf ""
  165.     printf "   0 = Salir"
  166.     printf ""
  167.     printl " > "
  168.     RP = scanf
  169.     If Not isNumeric(RP) = True Then
  170.         printf ""
  171.         printf " ERROR: Opcion invalida, solo se permiten numero..."
  172.         Call showMenu()
  173.         Exit Function
  174.     End If
  175.     Select Case RP
  176.         Case 1
  177.             Call createGodMode()
  178.         Case 2
  179.             Call disableUAC()
  180.         Case 3
  181.             Call cleanSO()
  182.         Case 4
  183.             Call noPWD()
  184.         Case 5
  185.             Call showKeyboardTips()
  186.         Case 6
  187.             Call optionalFeatures()
  188.         Case 7
  189.             Call disableSpyware()
  190.         Case 8
  191.             Call cleanApps()
  192.         Case 9
  193.             Call disableOneDrive()
  194.         Case 10
  195.             Call disableDefender()
  196.         Case 11
  197.             Call powerSSD()
  198.         Case 12
  199.             Call showActivation()
  200.         Case 13
  201.             Call activate30()
  202.         Case 0
  203.             printf ""
  204.             printf " Gracias por utilizar mi script"
  205.             printf " AikonCWD dice adios!! ;D"
  206.             wait(2)
  207.             WScript.Quit
  208.         Case Else
  209.         printf ""
  210.         printf " INFO: Opcion invalida, ese numero no esta disponible"
  211.         Call showMenu()
  212.         Exit Function
  213.     End Select
  214. End Function
  215.  
  216. Function createGodMode()
  217.     godFolder = oWSH.SpecialFolders("Desktop") & "\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}"
  218.     If oFSO.FolderExists(godFolder) = False Then
  219.         oFSO.CreateFolder(godFolder)
  220.         printf ""
  221.         printf " INFO: Se ha creado un acceso directo en tu escritorio"
  222.         Call showMenu
  223.     Else
  224.         printf ""
  225.         printf " INFO: Ya existe el modo dios, ejecutalo desde tu Escritorio"
  226.         call showMenu
  227.     End If
  228. End Function
  229.  
  230. Function disableUAC()
  231.     printf ""
  232.     printf " Ahora se ejecutara una ventana..."
  233.     printf " Mueve la barra vertical hasta el nivel mas bajo"
  234.     printf " Acepta los cambios y reinicia el ordenador"
  235.     wait(2)
  236.     printf ""
  237.     printf " INFO: Executing UserAccountControlSettings.exe"
  238.     oWSH.Run "UserAccountControlSettings.exe"
  239.     Call showMenu
  240. End Function
  241.  
  242. Function cleanSO()
  243.     printf ""
  244.     printf " Ahora se ejecutara una ventana..."
  245.     printf " Marca las opciones deseadas de limpieza"
  246.     printf " Acepta los cambios y reinicia el ordenador"
  247.     wait(2)
  248.     printf ""
  249.     printf " INFO: Executing cleanmgr.exe"
  250.     oWSH.Run "cleanmgr.exe"
  251.     Call showMenu
  252. End Function
  253.  
  254. Function noPWD()
  255.     printf ""
  256.     printf " Ahora se ejecutara una ventana..."
  257.     printf " Desmarca la opcion: Los usuarios deben escribir su nombre y password para usar el equipo"
  258.     printf " Acepta los cambios y reinicia el ordenador"
  259.     wait(2)
  260.     printf ""
  261.     printf " INFO: Executing control userpasswords2"
  262.     oWSH.Run "control userpasswords2"
  263.     Call showMenu
  264. End Function
  265.  
  266. Function optionalFeatures()
  267.     printf ""
  268.     printf " Ahora se ejecutara una ventana..."
  269.     printf " Marca/Desmarca las opciones deseadas"
  270.     printf " Acepta los cambios y reinicia el ordenador"
  271.     wait(2)
  272.     printf ""
  273.     printf " INFO: Executing optionalfeatures.exe"
  274.     oWSH.Run "optionalfeatures.exe"
  275.     Call showMenu
  276. End Function
  277.  
  278. Function showKeyboardTips()
  279.     printf ""
  280.     printf " Ahora se ejecutara una pagina web..."
  281.     printf " En ella encontraras todas las combinaciones de teclas utiles en Win10"
  282.     wait(2)
  283.     printf ""
  284.     printf " INFO: Executing web-browser"
  285.     oWSH.Run "http://reviews.gizmodo.com/the-ultimate-guide-to-windows-10-keyboard-shortcuts-1720656591"
  286.     Call showMenu
  287. End Function
  288.  
  289. Function disableSpyware()
  290.     printf ""
  291.     printf " Deshabilitando Telemetry usando el registro..."
  292.     wait(1)
  293.         oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection\AllowTelemetry", 0, "REG_DWORD"
  294.         oWSH.RegWrite "HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\DataCollection\AllowTelemetry", 0, "REG_DWORD"
  295.     printf ""
  296.     printf " INFO: Telemetry deshabilitado correctamente"
  297.  
  298.     pathLOG = oWSH.ExpandEnvironmentStrings("ProgramData") & "\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl"
  299.     printf ""
  300.     printf " Borrando DiagTrack Log..."
  301.     wait(1)
  302.         If oFSO.FileExists(pathLOG) Then oFSO.DeleteFile(pathLOG)
  303.     printf ""
  304.     printf " INFO: DiagTrack Log borrado correctamente"
  305.  
  306.     printf ""
  307.     printf " Deshabilitando servicios de seguimiento..."
  308.     wait(1)
  309.         oWSH.Run "sc stop DiagTrack"
  310.         oWSH.Run "sc stop RetailDemo"
  311.         oWSH.Run "sc stop dmwappushservice"
  312.         oWSH.Run "sc config DiagTrack start=disabled"
  313.         oWSH.Run "sc config RetailDemo start=disabled"
  314.         oWSH.Run "sc config dmwappushservice start=disabled"
  315.     printf ""
  316.     printf " INFO: Servicios de seguimiento deshabilitados"
  317.  
  318.     printf ""
  319.     printf " Deshabilitando tareas programadas que envian datos a Microsoft..."
  320.     oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" & chr(34) & " /DISABLE"
  321.     oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Application Experience\ProgramDataUpdater" & chr(34) & " /DISABLE"
  322.     oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" & chr(34) & " /DISABLE"
  323.     oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" & chr(34) & " /DISABLE"
  324.     oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Customer Experience Improvement Program\Uploader" & chr(34) & " /DISABLE"
  325.     oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" & chr(34) & " /DISABLE"
  326.     printf ""
  327.     printf " INFO: Tareas programadas de seguimiento deshabilitadas"
  328.  
  329.     printf ""
  330.     printf " Deshabilitando acceso a los servidores de publicidad de Microsoft..."
  331.     wait(1)
  332.     Set F = oFSO.CreateTextFIle("C:\Windows\System32\drivers\etc\hosts", True)
  333.         F.WriteLine "127.0.0.1  localhost"
  334.         F.WriteLine "127.0.0.1  localhost.localdomain"
  335.         F.WriteLine "255.255.255.255    broadcasthost"
  336.         F.WriteLine "::1        localhost"
  337.         F.WriteLine "127.0.0.1  local"
  338.         F.WriteLine "0.0.0.0 vortex.data.microsoft.com"
  339.         F.WriteLine "0.0.0.0 vortex-win.data.microsoft.com"
  340.         F.WriteLine "0.0.0.0 telecommand.telemetry.microsoft.com"
  341.         F.WriteLine "0.0.0.0 telecommand.telemetry.microsoft.com.nsatc.net"
  342.         F.WriteLine "0.0.0.0 oca.telemetry.microsoft.com"
  343.         F.WriteLine "0.0.0.0 oca.telemetry.microsoft.com.nsatc.net"
  344.         F.WriteLine "0.0.0.0 sqm.telemetry.microsoft.com"
  345.         F.WriteLine "0.0.0.0 sqm.telemetry.microsoft.com.nsatc.net"
  346.         F.WriteLine "0.0.0.0 watson.telemetry.microsoft.com"
  347.         F.WriteLine "0.0.0.0 watson.telemetry.microsoft.com.nsatc.net"
  348.         F.WriteLine "0.0.0.0 redir.metaservices.microsoft.com"
  349.         F.WriteLine "0.0.0.0 choice.microsoft.com"
  350.         F.WriteLine "0.0.0.0 choice.microsoft.com.nsatc.net"
  351.         F.WriteLine "0.0.0.0 df.telemetry.microsoft.com"
  352.         F.WriteLine "0.0.0.0 reports.wes.df.telemetry.microsoft.com"
  353.         F.WriteLine "0.0.0.0 wes.df.telemetry.microsoft.com"
  354.         F.WriteLine "0.0.0.0 services.wes.df.telemetry.microsoft.com"
  355.         F.WriteLine "0.0.0.0 sqm.df.telemetry.microsoft.com"
  356.         F.WriteLine "0.0.0.0 telemetry.microsoft.com"
  357.         F.WriteLine "0.0.0.0 watson.ppe.telemetry.microsoft.com"
  358.         F.WriteLine "0.0.0.0 telemetry.appex.bing.net"
  359.         F.WriteLine "0.0.0.0 telemetry.urs.microsoft.com"
  360.         F.WriteLine "0.0.0.0 telemetry.appex.bing.net:443"
  361.         F.WriteLine "0.0.0.0 settings-sandbox.data.microsoft.com"
  362.         F.WriteLine "0.0.0.0 vortex-sandbox.data.microsoft.com"
  363.         F.WriteLine "0.0.0.0 survey.watson.microsoft.com"
  364.         F.WriteLine "0.0.0.0 watson.live.com"
  365.         F.WriteLine "0.0.0.0 watson.microsoft.com"
  366.         F.WriteLine "0.0.0.0 statsfe2.ws.microsoft.com"
  367.         F.WriteLine "0.0.0.0 corpext.msitadfs.glbdns2.microsoft.com"
  368.         F.WriteLine "0.0.0.0 compatexchange.cloudapp.net"
  369.         F.WriteLine "0.0.0.0 cs1.wpc.v0cdn.net"
  370.         F.WriteLine "0.0.0.0 a-0001.a-msedge.net"
  371.         F.WriteLine "0.0.0.0 statsfe2.update.microsoft.com.akadns.net"
  372.         F.WriteLine "0.0.0.0 sls.update.microsoft.com.akadns.net"
  373.         F.WriteLine "0.0.0.0 fe2.update.microsoft.com.akadns.net"
  374.         F.WriteLine "0.0.0.0 65.55.108.23 "
  375.         F.WriteLine "0.0.0.0 65.39.117.230"
  376.         F.WriteLine "0.0.0.0 23.218.212.69 "
  377.         F.WriteLine "0.0.0.0 134.170.30.202"
  378.         F.WriteLine "0.0.0.0 137.116.81.24"
  379.         F.WriteLine "0.0.0.0 diagnostics.support.microsoft.com"
  380.         F.WriteLine "0.0.0.0 corp.sts.microsoft.com"
  381.         F.WriteLine "0.0.0.0 statsfe1.ws.microsoft.com"
  382.         F.WriteLine "0.0.0.0 pre.footprintpredict.com"
  383.         F.WriteLine "0.0.0.0 204.79.197.200"
  384.         F.WriteLine "0.0.0.0 23.218.212.69"
  385.         F.WriteLine "0.0.0.0 i1.services.social.microsoft.com"
  386.         F.WriteLine "0.0.0.0 i1.services.social.microsoft.com.nsatc.net"
  387.         F.WriteLine "0.0.0.0 feedback.windows.com"
  388.         F.WriteLine "0.0.0.0 feedback.microsoft-hohm.com"
  389.         F.WriteLine "0.0.0.0 feedback.search.microsoft.com"
  390.     F.Close
  391.     printf ""
  392.     printf " INFO: Fichero HOSTS escrito correctamente"
  393.    
  394.     Call showMenu
  395. End Function
  396.  
  397. Function disableOneDrive()
  398.     printf ""
  399.     printf " Deshabilitando OneDrive usando el registro..."
  400.     wait(1)
  401.         oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive\DisableFileSyncNGSC", 1, "REG_DWORD"
  402.         oWSH.RegWrite "HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive\DisableFileSyncNGSC", 1, "REG_DWORD"
  403.     printf ""
  404.     printf " INFO: OneDrive deshabilitado correctamente"
  405.     Call showMenu
  406. End Function
  407.  
  408. Function disableDefender()
  409.     printf ""
  410.     printf " Deshabilitando Windows Defender usando el registro..."
  411.     wait(1)
  412.         oWSH.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\DisableAntiSpyware", 1, "REG_DWORD"
  413.         oWSH.RegWrite "HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender\DisableAntiSpyware", 1, "REG_DWORD"
  414.     printf ""
  415.     printf " INFO: Windows Defender deshabilitado correctamente"
  416.     printf " WARNING: Si no tienes antivirus, te recomiendo 360 Total Security: www.360totalsecurity.com"
  417.     wait(1)
  418.     Call showMenu
  419. End Function
  420.  
  421. Function showActivation()
  422.     printf ""
  423.     printf " En unos segundos aparecera el estado de tu activacion..."
  424.     wait(1)
  425.         oWSH.Run "slmgr.vbs /dlv"
  426.         oWSH.Run "slmgr.vbs /xpr"
  427.     printf ""
  428.     printf " INFO: Script slmgr ejecutado correctamente"
  429.     Call showMenu
  430. End Function
  431.  
  432. Function activate30()
  433.     printf ""
  434.     printf " Esta funcion sirve para forzar la activacion de Windows 10"
  435.     printf " solo se debe utilizar si tienes problemas para validar la licencia"
  436.     printf ""
  437.     printl " El proceso demora varios minutos. Deseas continuar? (s/n) "
  438.    
  439.     If scanf <> "s" Then
  440.         printf ""
  441.         printf " INFO: Proceso cancelado por el usuario"
  442.         wait(1)
  443.         Call showMenu
  444.         Exit Function
  445.     End If
  446.    
  447.     printf " Se va a ejecutar slmgr /ato 30 veces, sea paciente..."
  448.     wait(1)
  449.         For i = 1 To 30
  450.             printf "  > (" & i & ") Ejecutando slmgr.vbs /ato"
  451.             oWSH.Run "slmgr.vbs /ato"
  452.         Next
  453.     printf ""
  454.     printf " INFO: Script slmgr ejecutado correctamente"
  455.     printf " INFO: El resultado tarda unos segundos en aparecer, espere..."
  456.     wait(1)
  457.     Call showMenu
  458. End Function
  459.  
  460. Function cleanApps()
  461.     printf ""
  462.     printf " Este script va a desinstalar el siguiente listado de Apps:"
  463.     printf ""
  464.     printf "  > Bing"
  465.     printf "  > Zune"
  466.     printf "  > Skype"
  467.     printf "  > XboxApp"
  468.     printf "  > OneNote"
  469.     printf "  > 3DBuilder"
  470.     printf "  > Getstarted"
  471.     printf "  > Windows Maps"
  472.     printf "  > Windows Phone"
  473.     printf "  > Windows Camera"
  474.     printf "  > Windows Alarms"
  475.     printf "  > Windows Sound Recorder"
  476.     printf "  > Windows Communications Apps"
  477.     printf "  > Microsoft People"
  478.     printf "  > Microsoft Office Hub"
  479.     printf "  > Microsoft Solitaire Collection"
  480.     printf ""
  481.     printl " La opcion no es reversible. Deseas continuar? (s/n) "
  482.    
  483.     If scanf = "s" Then
  484.         oWSH.Run "powershell get-appxpackage -Name *Bing* | Remove-AppxPackage", 1, True
  485.         oWSH.Run "powershell get-appxpackage -Name *Zune* | Remove-AppxPackage", 1, True
  486.         oWSH.Run "powershell get-appxpackage -Name *XboxApp* | Remove-AppxPackage", 1, True
  487.         oWSH.Run "powershell get-appxpackage -Name *OneNote* | Remove-AppxPackage", 1, True
  488.         oWSH.Run "powershell get-appxpackage -Name *SkypeApp* | Remove-AppxPackage", 1, True
  489.         oWSH.Run "powershell get-appxpackage -Name *3DBuilder* | Remove-AppxPackage", 1, True
  490.         oWSH.Run "powershell get-appxpackage -Name *Getstarted* | Remove-AppxPackage", 1, True
  491.         oWSH.Run "powershell get-appxpackage -Name *Microsoft.People* | Remove-AppxPackage", 1, True
  492.         oWSH.Run "powershell get-appxpackage -Name *MicrosoftOfficeHub* | Remove-AppxPackage", 1, True
  493.         oWSH.Run "powershell get-appxpackage -Name *MicrosoftSolitaireCollection* | Remove-AppxPackage", 1, True
  494.         oWSH.Run "powershell get-appxpackage -Name *WindowsCamera* | Remove-AppxPackage", 1, True
  495.         oWSH.Run "powershell get-appxpackage -Name *WindowsAlarms* | Remove-AppxPackage", 1, True
  496.         oWSH.Run "powershell get-appxpackage -Name *WindowsMaps* | Remove-AppxPackage", 1, True
  497.         oWSH.Run "powershell get-appxpackage -Name *WindowsPhone* | Remove-AppxPackage", 1, True
  498.         oWSH.Run "powershell get-appxpackage -Name *WindowsSoundRecorder* | Remove-AppxPackage", 1, True
  499.         oWSH.Run "powershell get-appxpackage -Name *windowscommunicationsapps* | Remove-AppxPackage", 1, True
  500.         printf ""
  501.         printf " INFO: Las Apps se han desinstalado correctamente..."
  502.     Else
  503.         printf ""
  504.         printf " INFO: Operacion cancelada por el usuario"
  505.     End If
  506.     wait(1)
  507.     Call showMenu
  508. End Function
  509.  
  510. Function powerSSD()
  511.     printf ""
  512.     printf " Este script va a modificar las siguientes configuraciones:"
  513.     printf ""
  514.     printf "  > Habilitar TRIM"
  515.     printf "  > Deshabilitar VSS (Shadow Copy)"
  516.     printf "  > Deshabilitar Windows Search + Indexing Service"
  517.     printf "  > Deshabilitar defragmentador de discos"
  518.     printf "  > Deshabilitar hibernacion del sistema"
  519.     printf "  > Deshabilitar Prefetcher + Superfetch"
  520.     printf "  > Deshabilitar ClearPageFileAtShutdown + LargeSystemCache"
  521.     printf ""
  522.     printl " Deseas continuar? (s/n) "
  523.    
  524.     If scanf = "s" Then
  525.         printf ""
  526.         oWSH.Run "fsutil behavior set disabledeletenotify 0"
  527.         printf " # TRIM habilitado"
  528.         wait(1)
  529.         oWSH.Run "vssadmin Delete Shadows /All /Quiet"
  530.         oWSH.Run "sc stop VSS"
  531.         oWSH.Run "sc config VSS start=disabled"
  532.         printf " # Shadow Copy eliminada y deshabilitada"
  533.         wait(1)
  534.         oWSH.Run "sc stop WSearch"
  535.         oWSH.Run "sc config WSearch start=disabled"
  536.         printf " # Windows Search + Indexing Service deshabilitados"
  537.         wait(1)
  538.         oWSH.Run "schtasks /change /TN " & chr(34) & "\Microsoft\Windows\Defrag\ScheduledDefrag" & chr(34) & " /DISABLE"
  539.         printf " # Defragmentador de disco deshabilitado"
  540.         wait(1)
  541.         oWSH.Run "powercfg -h off"
  542.         printf " # Hibernacion deshabilitada"
  543.         wait(1)
  544.         oWSH.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters\EnablePrefetcher", 0, "REG_DWORD"
  545.         oWSH.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters\EnableSuperfetch", 0, "REG_DWORD"
  546.         oWSH.Run "sc stop SysMain"
  547.         oWSH.Run "sc config SysMain start=disabled"
  548.         printf " # Prefetcher + Superfetch deshabilitados"
  549.         wait(1)
  550.         oWSH.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\ClearPageFileAtShutdown", 0, "REG_DWORD"
  551.         oWSH.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache", 0, "REG_DWORD"
  552.         printf " # ClearPageFileAtShutdown + LargeSystemCache deshabilitados"
  553.         wait(1)
  554.         printf ""
  555.         printf " INFO: Felicidades, acabas de prolongar la vida y el rendimiento de tu SSD"
  556.     Else
  557.         printf ""
  558.         printf " INFO: Operacion cancelada por el usuario"
  559.     End If
  560.     wait(1)
  561.     Call showMenu  
  562. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement