One not obvious nuance: JScript works like version 5.7 in Windows Script Host 5.8.
From MSDN: note Starting with JScript 5.8, by default the JScript scripting engine supports a set of language functions as it existed in version 5.7. . This must support compatibility with earlier versions of the engine. To use the full set of language features in version 5.8, the Windows Script interface host must call IActiveScriptProperty :: SetProperty. ( MSDN, JScript Version Information )
Even worse, JScript claims version 5.8 (not 5.7) in this case by default (see the output of [ScriptEngineMajorVersion(), ScriptEngineMinorVersion()] ).
JScript 5.8 introduced the following functions : JSON object, JSON.parse method, JSON.stringify method, toJSON method, defineProperty , getOwnPropertyDescriptor method.
Unfortunately, there is no easy way to use these features in the cscript (or wscript ) host version 5.8. Update: One trick was found from @rojo in 2015. This trick is based on the htmlfile COM object, and it allows you to use at least some of the features mentioned.
See also question 19445189 cscript jscript JSON .
ruvim source share