Quantcast
Channel: 2BrightSparks
Viewing all articles
Browse latest Browse all 9303

Re: check if cifs share is available?

$
0
0
Works fine for me as per supplied VBS (just tested, with both cscript & wscript), and if you Google

set return value vbs

you'll find various examples all using same syntax (Wscript.Quit, with or without a return value, with or without brackets if value included). The WScript object is a basic part of VB scripting, and should be available to all scripts invoked via cscript or wscript.

Try removing the () so that the line in question reads

Wscript.Quit FoundHome

which also works for me. If that doesn't help, analysis of why it doesn't work for you is 'beyond my pay grade', sorry (especially as I can't reproduce the error - makes testing a bit difficult). It may be you have a slightly quirky scripting engine error (i.e. a Windows glitch)


BTW, check also for unintended typos or sp. mistakes introduced during editing. If necessary, revert to the original code and start again (you did make a fresh copy with a different name? If not, your next Pro upgrade will overwrite/replace any VBS with the original name with the factory-original script...)

Viewing all articles
Browse latest Browse all 9303

Trending Articles