A couple of things I’ve learnt recently:
Variables of a single character don’t get picked up with Option Explicit. This is definitely worth knowing!
Running either
Set Shell = wscript.createObject("wscript.shell")
or
Set WshNetwork = WScript.CreateObject("WScript.Network")
Will generally work, however they don’t seem to work consistently.
Set Shell = CreateObject("wscript.shell")
or
Set WshNetwork = CreateObject("WScript.Network")
Will work much better. I’m not sure why this is!
Leave a Reply