That’s a Usefull piece of code to change all the password of the schecduled tasks

Set WshShell = CreateObject("WScript.Shell")
PASS =InputBox("PASSWORD")
WshShell.Run "%comspec% /c " & chr(34) & "echo -------------------- %DATE% %TIME% -------------- " & chr(34) & " >>out.txt"
'

'-------- we use 2 vars , servidor where is the name of the server and tasca that is the name of the task
servidor="server"
WshShell.Run "%comspec% /c " & chr(34) & "echo --------------copies v-ioofi" & chr(34) & " >>out.txt"
tasca=chr(34) & "Nombre de tarea1" & chr(34)
WshShell.Run "%comspec% /c " & chr(34) & "schtasks.exe /change /s " & servidor &  " /RP " & PASS & " /TN " & tasca & chr(34) & " >>out.txt" ,1,true
tasca=chr(34) & "Nombre de tarea2" & chr(34)
WshShell.Run "%comspec% /c " & chr(34) & "schtasks.exe /change /s " & servidor &  " /RP " & PASS & " /TN " & tasca & chr(34) & " >>out.txt" ,1,true
Facebooktwitterredditpinterestlinkedinmail