Use WScript.Sleep() or replacement in mshta.exe one-liner
Use WScript.Sleep() or replacement in mshta.exe one-liner I want to use WScript.Sleep() function with a mshta.exe one-liner from a batch (I don't want to write temporary files) but I receive a WScript undefined error. WScript.Sleep() mshta.exe WScript undefined As stated in this answer: WScript is an object provided by the W|CScript.exe hosts; IExplorer or MSHTA don't provide it (see here). In Sleep routine for HTA scripts: window.setTimeOut window.ResizeTo select mshta I don't know how to make a single answer of these work or if possible. Inside a .js run by c/wscript it works perfectly. Is there a replacement or a way to reference this function for mshta.exe ? .js mshta.exe I found that question, but refers to .hta files and I don't see how the answers (that create sleep functions) can be adapted to a mshta "javascript: ...;close()" commands (one of them is .vbs actually). I add about this in the question. ...
