For those interested in this (sorry for hijack your post galaxyhub) :
Searching for a way to use Chakra or Jscript9 in WSH, I think that I found (at least it seems so) a workaround. This is what I do:
DO NOT PROCEED IF YOU DON'T UNDERSTAND ANY OF THIS
The CLSID for the Chakra Javascript engine is :
{16d51579-a30b-4c8b-a276-0ff4dc41e755}
Check if you have this registry keys (create if you don't):
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{16d51579-a30b-4c8b-a276-0ff4dc41e755}\ProgID]
@="Chakra"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{16d51579-a30b-4c8b-a276-0ff4dc41e755}\ProgID]
@="Chakra"
From here, we could enable chakra with its own entry, to call it this way:
cscript.exe Version.js //E:Chakra
For that, we have to first create other entries in the registry. But since we are most interested in using with DO, and since in DO there's no way to set the engine, we're going to replace the jscript default entry. For that, search for:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\JScript\CLSID
and change the value to {16d51579-a30b-4c8b-a276-0ff4dc41e755}
Seems you don't need to reboot for the change to take effect.
A little test in DO before the change:
And then after:
Make sure to revert the changes after you're done with testing, since it may break other things (?).
So perhaps an option in DO to select Chakra, if it's enabled as engine, to avoid replacing jscript engine would be nice.
PD: Sorry for the crappy explanation
Update: It seems that you don't need to change HKEY_LOCAL_MACHINE\SOFTWARE\Classes\JScript\CLSID
. In fact, after creating a new entry for Chakra in the registry, it appears as selectable in DO:
I made this changes :
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{16d51579-a30b-4c8b-a276-0ff4dc41e755}\ProgID]
@="Chakra"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{16d51579-a30b-4c8b-a276-0ff4dc41e755}\ProgID]
@="Chakra"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Chakra]
@="JScript Language"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Chakra\CLSID]
@="{16d51579-a30b-4c8b-a276-0ff4dc41e755}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Chakra\OLEScript]
(You will probably need change permissions for the first two.)