Question: How to set delay in vbscript?

`WScript.Sleep(100)` does not work on Windows XP, Vista.

Answer: 
Here's another alternative:

```
Sub subSleep(strSeconds) ' subSleep(2)
    Dim objShell
    Dim strCmd
    set objShell = CreateObject("wscript.Shell")
    'objShell.Run cmdline,1,False

    strCmd = "%COMSPEC% /c ping -n " & strSeconds & " 127.0.0.1>nul"     
    objShell.Run strCmd,0,1 
End Sub 

```
```
WScript.Sleep 100

```

The following code should work properly.