Elliot B. Posted April 18, 2018 Share Posted April 18, 2018 (edited) I have the following VBS script that runs on Windows startup: Set WshShell = CreateObject("WScript.Shell") WshShell.Run chr(34) & "C:\processend.bat" & Chr(34), 0 Set WshShell = Nothing processend.bat consists of a list of taskkill /t /im commands. However, the VBS script is running when Windows starts up, before the background tasks are even running. Is it possible to delay running the script for 60 seconds after startup? Something like a timeout in the BAT, above the taskkill commands, perhaps? Link to comment Share on other sites More sharing options...
Daedroth Posted April 18, 2018 Share Posted April 18, 2018 (edited) WScript.Sleep 60000 That would sleep the script for 60 seconds (time is specified in milliseconds). Elliot B. 1 Share Link to comment Share on other sites More sharing options...
Elliot B. Posted April 18, 2018 Author Share Posted April 18, 2018 4 minutes ago, Daedroth said: WScript.Sleep 60000 That would sleep the script for 60 seconds (time is specified in milliseconds). Which line do I pop that on in the VBS? Link to comment Share on other sites More sharing options...
Daedroth Posted April 18, 2018 Share Posted April 18, 2018 In that three line script, I'd make it the first line. Elliot B. 1 Share Link to comment Share on other sites More sharing options...
Elliot B. Posted April 18, 2018 Author Share Posted April 18, 2018 1 minute ago, Daedroth said: In that three line script, I'd make it the first line. Fantastic, thank you! Link to comment Share on other sites More sharing options...
Daedroth Posted April 18, 2018 Share Posted April 18, 2018 Just now, Elliot B. said: Fantastic, thank you! No problem. Link to comment Share on other sites More sharing options...
Recommended Posts