[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: New copy and paste function



Reply to note from "Robert Holmgren"  Sun, 9
Nov 2003 10:22:43 -0500

Robert:

> But what makes CSCRIPT intrinsically sensitive to the term
> "VBSFile"? Are you suggesting that "VBSFile" is a reserved
> word, and doesn't need to be FTYPEd?

Yes, as I understand it (and my understanding of these matters is
hazy), vbsfile is a Registry subkeyword (defined at the time of
installation), along with txtfile and others. When you associate a
file extension with vbsfile (whether by issuing an ASSOC command or
editing the Registry directly), those files are tagged as being
intepretable by the VBScript "engine" (specified in Registry
subsubkeyword [HKEY_CLASSES_ROOT\VBSFile\ScriptEngine]), just as
associating an extension with "plfile" makes those files
interpretable by the Perl engine (if installed). A common way to
virus-protect a system is to associate the .VBS and .PL extensions
with the "txtfile" keyword, to make them uninterpretable by any
engine (unless extra steps are taken).

Vis-a-vis scripts, the FTYPE command does something else; it
establishes (I think) a default "host", i.e., the default program to
launch the script; it doesn't determine the interpreting "engine".
CSCRIPT and WSCRIPT, along with IE and any number of other apps
capable of launching scripts, are "hosts" not "engines". So, if you
ASSOCiate .VBS with vbsfile and FTYPE .VBS files to open in Notepad,
they should still be interpretable as VBS scripts when explicitly
launched with CSCRIPT, IE or another host. But if you ASSOCiate
VBS with the txtfile file type, an explicit override, such as the
//e:vbscript switch, would be required.

That's my reading, anyway. I certainly wouldn't add an //e: switch
to CLIPW*. That would countermand a Registry instruction to disable
VBScript system-wide, contrary to the expectations of users who take
that step. If you opt out of VBScript altogether, that should be
that.

> But if you habitually used a ".XY" extension, and simply went
> half way -- "ASSOC .xy=XyWriteFile" -- that wouldn't be enough;
> you'd have to associate FileTYPE "XyWriteFile" with Editor --
> no?

I think that's right, because "XyWriteFile" doesn't have a
predetermined meaning in Windows. You'd have to add the appropriate
lines to the Registry ([HKEY_CLASSES_ROOT\XyWriteFile] and whatever
subkeys). The following post, which addresses how "vbsfile" is
defined, is suggestive of what is required:

XPLeNCODE v2.0
b-gin [UNTITLED]
http://groups.google.com/groups?q=registry+vbsfile&hl=en&lr=&;
ie=UTF-8&selm=f679dv01vb2gssir3d1se2v8v9hum1pq02%404ax.com&rn
um=1
-nd
XPLeNCODE

Oy, veh!

C.


--
Carl Distefano
cld@xxxxxxxx