Re: Why is the Script 5.6 documentation so crummy?



I don't think that the WSH and Windows scripting
were entirley designed beforehand. It was kind of
a paste-together operation. First MS came out with
VBS for browser scripting. The older VBScript
books are only about the IE DOM, with no mention of
FSO, etc.
(I was very confused myself when I first
bought an older VBScript book. I couldn't find any
mention of file methods. What happened was that MS
created VBS in response to Netscape's javascript,
presumably in order to avoid compatibility and help
push Netscape offstage. At that time Windows "scripting"
was BAT files.)

At some point MS expanded the abilities
of Windows scripting beyond BAT files, by coming up
with the WSH and expanding VBS and JS to do
things like create COM objects, which was never
part of browser scripting. That was apparently a
response to people who wanted extended script
abilities for sys. admin., etc. But it wasn't a new,
independently-designed, shell scripting system.
It was an afterthought tacked onto the existing
browser scripting functionality. (That's why a lot of
people complain about IE scripting and why many
people remove the WSH from their systems - safe
browser scripting and unsafe Windows scripting are
just too difficult to keep separate.)

MS came out with WScript to run Windows scripts,
SCRRUN.DLL to house the basic scripting file system
API, and WSHOM.OCX to provide other scripting
functions in the context of the WSH.

One would expect that the VBScript help file would
only be for VBS proper, but MS decided to throw in
the SCRRUN.DLL methods and pretend that those were
part of VBScript. So that's part of the confusion. When you
create Scripting.FileSystemObject it's an official part
of VBS, but when you create Shell.Application it's not.
They just took one COM object and said, "This is now
part of the VBScript language."

The other help file, the WSH CHM file, is basically
about the functions in WSHOM.OCX and a smattering
of odds and ends that were made part of WSH.

-----
Since post-browser/WSH VBS could now use COM
objects through CreateObject, that made many COM
objects available in script.
That included a lot of the Active Desktop functionality,
which is in SHDOC401.DLL. That's where the Shell
object comes from. It's actually part of the system of
COM interfaces for the "Web View" functionality in
Explorer.

By the same token, WMI has been made available to
VBS but it's not part of WSH, so the documentation
is entirely separate and someone starting to study
VBS can get very confused seeing samples that use
the SQL-ish syntax of WMI and unrecognized methods.

I hope I'm not just adding to the confusion with this
explanation. :) The basic point is that the line between
VBS, WSH and scriptable objects is blurry and somewhat
arbitrary. You just have to know what's usable and then
find the documentation for that. In other words, read up
on the IE DOM if you need browser scripting, get the
WMI help for WMI scripting, look up Shell Object at
MSDN for the Shell.Application, etc.

--
mayayanaXX1a@xxxxxxxxxxxxxxxx
(Remove Xs for return email.)
"Crash" Dummy <dvader@xxxxxxxxxxxxx> wrote in message
news:OsogET46FHA.252@xxxxxxxxxxxxxxxxxxxxxxx
> It seems like every time I want to look up some new (to me) feature I
learn
> about in these groups using the Script 5.6 documents, it's not there. For
> example, there is no mention anywhere of something as basic as the Shell
object.
> I tried to look up "BrowseForFolder" after seeing it for the first time in
this
> group, and nothing.
>
> Fortunately, I have the "Windows 2000 Scripting Guide," but I shouldn't
have to
> shell out for a book to get a list of objects, properties, and methods.
> --
> Crash
>
>


.