public sub Main()
Set objShell = CreateObject("WScript.Shell")
strCommand = "C:/Program Files/s/schedule.exe"
objShell.Run strCommand, vbHide, True
Unload Me
end sub
it’s supposed to run schedule.exe hidden….but program crashes with
Runtime error '-2147024894 (80070002)' :
method '~' of object '~' failed
basically i need schedule.exe to run silently without interrupting the user.
If you had a reference to
Windows Script Host Object Modelyou would get this more descriptive error message:This might clue you that you had to quote the executable filename if it contains spaces like this: