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
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\" %*"
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...
In any case, manually editing the value did the trick.
Thanks!
-- Matt
Thanks!
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...
"...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...