I'm trying to learn how to run Javascript (instead of VBScript) using CScript.exe, but when I try, I get an error:
cscript temp.js
Input Error: There is no script engine for file extension ".js".
I thought this is possible -- any idea what's wrong?
Setting the registry with regsvr32 did not work for me. Also, I don't want it, since I want my .js to be linked with a plain text editor.
But there is a command line option //E
for cscript which makes the job:
cscript //E:jscript hello.js
A very simple fix: use assoc.
c:\>assoc .js=JSFile
(Mine had become associated with a text editor at some point.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With