VBScript and batch file fails when run by Task Scheduler
问题 I have a VBScript that checks to see if MS Word is running hidden, makes it visible, then hides it again. here is the script code that works fine when I double click the file in Explorer: dim oWord Dim wshShell, btn Set wshShell = WScript.CreateObject("WScript.Shell") set oWord = getobject(, "Word.Application") if isobject(oWord) then on error goto 0 wshShell.Popup "Word is running, making visible", 7, "ALPS Push print", &H0 + &H40 oWord.visible=true wshShell.Popup "MS Word is now visible" &