Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

There is no script engine for file extension .vbs

174 views
Skip to first unread message

Matt White

unread,
Oct 1, 2001, 4:24:52 PM10/1/01
to
Hi All -

Made my script, gave it to a client. Client has Win95. Told them to install
the scripting host from the MS web site. They installed version 5.5 (no 5.6
for Win95).

When they double-click the script it opens in Notepad. So I had them
associate the .VBS extension with wscript.exe in system32. Same error (There
is no script engine for file extension .vbs).

Had them run "cscript filename.vbs", same error.

Thanks in advance for any help on this.

-- Matt


Torgeir Bakken

unread,
Oct 1, 2001, 4:55:00 PM10/1/01
to
This sounds odd (in worst case, a virus?) . Try to reinstall 5.5 again. They
did restart the computer(s)?


Registry values that must be in place for WSH to work:

.VBS (don't mess with this one ;-)

[HKEY_CLASSES_ROOT\.VBS]
@="VBSFile"


*Extract* for VBSFile:

[HKEY_CLASSES_ROOT\VBSFile]
@="VBScript Script File"

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command]
@="<some windows folder>\\WScript.exe \"%1\" %*"

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open2\Command]
@="<some windows folder>\\CScript.exe \"%1\" %*"

Michael Harris (MVP)

unread,
Oct 1, 2001, 11:48:54 PM10/1/01
to
Check the registry for corrupted keys...

You should find

HKEY_CLASSES_ROOT\.vbs with default value of -> VBSFile

There should also be

HKEY_CLASSES_ROOT\VBSFile with several subkeys

one of which is

HKEY_CLASSES_ROOT\VBSFile\ScriptEngine with a default value of -> VBScript

which is a pointer to

HKEY_CLASSES_ROOT\VBScript

which has CLSID and OLEScript subkeys.

These are NOT all of the scripting related registry keys. But I have seen similar problems posted that were caused by a missing HKEY_CLASSES_ROOT\.vbs which is the very start of the chain...

If HKEY_CLASSES_ROOT\.vbs is missing or has the wrong default value, but the HKEY_CLASSES_ROOT\VBSfile key is there and looks reasonably correct then you *MAY* be able to correct the problem by creating/repairing the HKEY_CLASSES_ROOT\.vbs key.

--

Michael Harris
Microsoft.MVP.Scripting
--
mik...@mvps.org
Please do not email questions - post them to the newsgroup instead.
--
"Matt White" <m...@cbord.com> wrote in message news:evT7tcrSBHA.1408@tkmsftngp04...

Matt White

unread,
Oct 2, 2001, 11:24:56 AM10/2/01
to
The culprit was the very first entry we checked, the .VBS default value. It
was TEXTFile instead of VBSFile. I think that this could be because of the
association with Notepad that we found and removed, but apparently just
changing the extension association back to WScript.EXE didn't fix that
registry entry.

In any case, manually editing the value did the trick.

Thanks!

-- Matt


Matt White

unread,
Oct 2, 2001, 11:27:32 AM10/2/01
to
The culprit was, indeed, the first registry entry. The .VBS entry had a
value of 'TEXTFile' instead of 'VBSFile'. Modifying the value fixed the
problem.

Thanks!


Michael Harris (MVP)

unread,
Oct 2, 2001, 3:52:28 PM10/2/01
to
A lot of people have attempted to disable WSH by hacking the .vbs registry key in a similar manner. I suppose it could also be done inadvertently by a variety of shareware/freeware text editors as well.

In any case, if anyone is still intent on disabling WSH, it's no trivial to do with WSH 5.6.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Script Host\Settings
has a named (string) value of: Enabled

"1" is the default setting (enables the use of WSH) and "0" disables WSH completely.

--
Michael Harris
Microsoft.MVP.Scripting
--
mik...@mvps.org
Please do not email questions - post them to the newsgroup instead.
--

"Matt White" <m...@cbord.com> wrote in message news:#IYqab1SBHA.2112@tkmsftngp05...

Michael Harris (MVP)

unread,
Oct 2, 2001, 4:56:50 PM10/2/01
to
Of course, that was supposed to be:

"...it's now trivial to do with WSH 5.6."

--
Michael Harris
Microsoft.MVP.Scripting
--
mik...@mvps.org
Please do not email questions - post them to the newsgroup instead.
--

"Michael Harris (MVP)" <mik...@mvps.org> wrote in message news:#OXtJv3SBHA.1960@tkmsftngp03...

0 new messages