I have no idea what the extension .ech is for.
Is C:\Script\WSH in your PATH?
Open a command prompt, type: path and hit Enter.
At a minumum it should have these
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
and you need to add C:\Script\WSH if that's where you are storing your
practice scripts.
See this on how to add to the PATH...
HOW TO Manage Environment Variables in Windows XP
http://support.microsoft.com/default...b;en-us;310519
Or move your scripts to a folder that is already listed in PATH.
[[The PATH environment variable defines the Windows NT search path. The
search path is a list of directories that are searched when the command
shell attempts to locate an executable file.
The PATHEXT environment variable defines the list of file extensions
checked by Windows NT when searching for an executable file. Like the PATH
variable, semi-colons separate individual items in the PATHEXT variable.
The default value of PATHEXT is .COM;.EXE;.BAT;.CMD. ]]
http://www.microsoft.com/technet/arc.../shellscr.mspx
You can also open a command prompt, type: set and hit Enter to see both
PATH & PATHEXT.
--
Hope this helps. Let us know.
Wes
MS-MVP Windows Shell/User
In news:(E-Mail Removed),
(E-Mail Removed) <(E-Mail Removed)> hunted and pecked:
>> At the same command prompt, type:
>> path and press ENTER.
>> is "C:\WINDOWS\system32" in there?
>
> Yes, mine is c:\WINXP\Systems32
>
>> Place HelloWScript.vbs in %windir% or %windir%\system32.
>> Open a command prompt and type:
>> HelloWScript Hit Enter
>
> Popup dialog created. Typing Hello and HelloWSH showed 'Not Recognized'
> error.
>
>> CScript "%windir%\system32\HelloWScript.vbs"
>> in a command prompt will echo Hello World! in the command prompt window.
>
> Yes, Popup dialog created.
>
> At my C:\Script\WSH command, typing Hello, HelloWSH, or HelloWScript
> now show the popup dialog.
>
> I am totally confused. One thing I did, which is different from the
> book, is I have had 3 Hello files with
> 3 different names, i.e. Hello.vbs, HelloWSH.vbs for WScript Shell, and
> HelloWScript for WScript.Ech.
> Is this the reason why the WScript and CScript commands are not
> working?