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
- 'http://superuser.com/questions/227860/how-to-toggling-uac-on-off-quickly-eg-using-command-line-in-windows-7
- 'http://stackoverflow.com/questions/5344021/bypass-uac-in-vbscript
- 'https://github.com/10se1ucgo/DisableWinTracking/blob/master/run.py
- 'https://www.reddit.com/r/Windows10/comments/3f38ed/guide_how_to_disable_data_logging_in_w10/
- Call ForceConsole()
- Call showBanner()
- 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 runElevated()
- If isUACRequired Then
- If Not isElevated Then RunAsUAC
- Else
- If Not isAdmin Then
- printf " WARNING: 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.5)
- 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 OS.Version > 5.2 Then
- r = True
- Else
- r = False
- End If
- Next
- isUAC = r
- End Function
- Function showBanner()
- printf("")
- printf(" #############################")
- printf(" # #")
- printf(" # WINDOWS 10 SCRIPT TWEAKER #")
- printf(" # by AikonCWD #")
- printf(" # v1.0 #")
- printf(" #############################")
- printf("")
- printf(" Comprobando requisitos del sistema...")
- Wait(1)
- End Function
- Function showMenu()
- Wait(1)
- printf ""
- printf " Selecciona una opcion:"
- printf ""
- printf " 1 = Habilitar el modo Dios"
- printf " 2 = Deshabilitar Telemetry"
- printf " 3 = Borrar ficheros log de seguimiento"
- printf " 4 = Deshabilitar servicios de recoleccion de datos"
- printf " 5 = Modificar entradas hosts para evitar publicidad"
- 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
- printf "has pulsado 2"
- Case 3
- printf "has pulsado 3"
- Case 4
- printf "has pulsado 4"
- Case 5
- printf "has pulsado 5"
- Case 0
- printf ""
- printf " Gracias por utilizar mi script. Adios!! ;D"
- wait(2.5)
- WScript.Quit
- Case Else
- printf ""
- printf " INFO: Opcion invalida, ese numero no esta disponible"
- Call showMenu()
- Exit Function
- End Select
- 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 createGodMode()
- godFolder = oWSH.SpecialFolders("Desktop") & "\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}"
- If oFSO.FolderExists(godFolder) = False Then
- printf ""
- printl(" Quieres crear el acceso directo 'GodMode' en tu escritorio? (s/n) ")
- If scanf = "s" Then
- oFSO.CreateFolder(godFolder)
- printf ""
- printf " INFO: Se ha creado un acceso directo en tu escritorio"
- Call showMenu
- Else
- printf ""
- printf " INFO: Operacion cancelada por el usuario"
- Call showMenu
- End If
- Else
- printf ""
- printf " INFO: Ya existe el modo dios, ejecutalo desde tu Escritorio"
- call showMenu
- End If
- End Function
- printf "Script executed. Press <enter> to quit"
- scanf
Add Comment
Please, Sign In to add comment