I ran across this error a few days ago while setting up a PHP server on my Windows XP Pro SP3 box for testing purposes. As part of this setup, a script needs to be run that associates the .php extension with php-cgi.exe. Here is the script:
cscript %windir%\system32\inetsrv\fcgiconfig.js -add -section:"PHP" ^ -extension:php -path:"C:\PHP\php-cgi.exe"
The problem, is that when I tried to run the script, I got the error:
Input Error: There is no script engine for file extension “.js”. It took me quite a bit of searching before I found the fix that worked for me on this IBM forum. Hopefully, if you’re facing this issue, you find my article before the 100 other articles talking about the 99 other fixes that didn’t work for me. :)
Resolving the problem
Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
Input Error: There is no script engine for file extension “.JS”.
If so, then check the current association of the “.JS” extension on that Windows system by running the following command:
It should show something like “.js=JSFile” on a working system. If it shows something else, note what it is for safekeeping and then change it with:
This worked perfectly for me, allowing the script to complete successfully. I had tried associating the filetype in Folder Options, but for a reason I don’t fully understand, I was unsuccessful. I hope this helps!