Delay running of vbs/bat on Windows startup for 60 seconds


Recommended Posts

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?

  On 18/04/2018 at 07:12, Daedroth said:
WScript.Sleep 60000

That would sleep the script for 60 seconds (time is specified in milliseconds).

Expand  

Which line do I pop that on in the VBS?

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.