@echo off
:: TESTWSH.BAT R.J.Holmgren 11/10/03
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 > testwsh.vbs
echo Set oShell=Wscript.CreateObject("Wscript.Shell") >> testwsh.vbs
echo Wscript.Quit(Err) >> testwsh.vbs
cscript.exe //nologo testwsh.vbs
REM cscript.exe //nologo //E:VBScript testwsh.vbs
echo *******
if errorlevel 1 echo WSH found, but NOT properly installed
if errorlevel 1 goto del
echo WSH is properly installed
:del
del testwsh.vbs
:end
echo *******
echo .
