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

Re: New copy and paste function



** Reply to message from cld@xxxxxxxx (Carl Distefano) on Sun, 9 Nov 2003
20:35:46 -0500

Carl:

>> Are you suggesting that "VBSFile" is a reserved
>> word, and doesn't need to be FTYPEd?

> Yes, as I understand it ...
> vbsfile is a Registry subkeyword (defined at the time of
> installation), along with txtfile and others... 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).

Great research. That URL is extremely interesting, especially the Symantec
stuff. We were on the cusp of figuring this out. We'll never know whether it
wouldn't work because WSH was broken, or because of disabled registry entries;
whether reinstallation actually overcomes (deletes and replaces) those registry
entries, or whether the //E switch might have worked, or NOSCRIPT.EXE (unless
we learn that his next Symantec run reimposes the problem -- actually I think
he runs McAfee). In sum, we've expended a _lot_ of energy on this topic, with
inconclusive results. Paul's WSH is working, but we don't know why.
Unsatisfactory.

One thing we need is a general script in our toolbox that tests whether WSH is
set up correctly -- something like the following BATch file (core idea by Bill
James) -- using this, *any* user can find out whether they are, or aren't,
ready to roll. Name it TESTVBS.BAT or something. It tries to ascertain,
first, whether CSCRIPT exists, and then creates and calls a VBS script
(TESTVBS.VBS) which, in turn, determines if the WSH object classes are properly
installed. The VBS script returns an error code to the BATch file, which
indicates Success or Failure. If WSH isn't "properly installed", user should
probably reinstall WSH, or else start delving deep into the bowels of the
Registry (or search for a file called NOSCRIPT.EXE, and have it reenable WSH).
If CSCRIPT _does_ exist, but WSH is "NOT properly installed", I'd enjoy to hear
about it before a reinstall -- it would be nice to get to the bottom of this
issue. Also, something I read from Tom Lavedas, a great guru of Batch file
scripting: he says that WSH was *not* installed automatically on Win95 A, B,
or C; that it generally exists on all W98; on WNT SP5+; on any machine with IE
v5+; and on all W2K and WXP (unless Symantec messed with it). And lastly, if
you get Paul's "Input Error: There is no script engine for file extension
'.VBS'", you might want to try the alternate CSCRIPT command with the //E:
argument (swap it for the immediately preceding command).

------------------------------
@echo off
echo .
echo *******
if exist %windir%\cscript.exe goto good
if exist %windir%\command\cscript.exe goto good
if exist %systemroot%\system32\cscript.exe goto good
if exist %windir%\system32\cscript.exe goto good
echo Windows Scripting Host is probably NOT INSTALLED
echo Scour your BootDrive with "dir C:\?SCRIPT.EXE /S /P"
goto end
:good
echo CScript.Exe exists
REM Keep period in next line, else bombs in W9x
echo.On Error Resume Next > testvbs.vbs
echo Set oShell=Wscript.CreateObject("Wscript.Shell") >> testvbs.vbs
echo Wscript.Quit(Err) >> testvbs.vbs
cscript.exe //nologo testvbs.vbs
REM cscript.exe //E:VBScript testvbs.vbs
echo *******
if errorlevel 1 echo WSH found, but NOT properly installed
if errorlevel 1 goto end
echo WSH installed properly
:end
echo *******
echo .
del testvbs.vbs
------------------------------