DO11: CLI Script Interpreter - support other WSH languages

Hello,

I'm aware of the reasons to use VBScript/JScript as scripting languages. Apart from Python I want to use Tcl/Tk and AutoHotkey. Therefore my question is whether it's possible to configue the Script interpreter settings in the Command Line Interface dialog?

Many thanks and greetings
opusfreak

It supports any Active Scripting language you have installed, you just need to enter the correct language name in the Script Interpreter field.

Hello Jon,

thanks for your fast answer. I wasn't aware of that. Maybe it would be usefull to add all the installed languages to the drop-down list just as a check.

Many thanks and greetings
opusfreak

There's no way to know what the installed languages are other than searching the entire HKEY_CLASSES_ROOT registry key (which we could do, but it doesn't seem that useful since generally very few people will install additional languages).

Hello Jon,

do you know the HKEY_CLASSES_ROOT registry keys (I ask because I have a problem with registering)?

Many thanks and greetings
opusfreak

No, that's the whole point :slight_smile: There's no nice neat sub-key that contains all of the script engines, they're spread out and the only way to find them is to start from the file extension and follow the trail (or to search for the ScriptEngine sub-key).

E.g. JScript is registered as follows:

HKEY_CLASSES_ROOT.js -> Default value points to JSFile.
HKEY_CLASSES_ROOT\JSFile\ScriptEngine -> Default value points to JScript.
HKEY_CLASSES_ROOT\JScript\CLSID -> Default value points to the CLSID of the JScript engine.

[quote="jon"]No, that's the whole point :slight_smile: There's no nice neat sub-key that contains all of the script engines, they're spread out and the only way to find them is to start from the file extension and follow the trail (or to search for the ScriptEngine sub-key).

E.g. JScript is registered as follows:

HKEY_CLASSES_ROOT.js -> Default value points to JSFile.
HKEY_CLASSES_ROOT\JSFile\ScriptEngine -> Default value points to JScript.
HKEY_CLASSES_ROOT\JScript\CLSID -> Default value points to the CLSID of the JScript engine.[/quote]
Jon, have you seen this?
ICatInformation.EnumClassesOfCategories
Use CATID_ActiveScriptParse and/or CATID_ActiveScript category as the second parameter. Link.
You'll have to map each returned classid to progid, but that's about it.

It requires that the engine has registered itself with that/those categories, but most (if not all) do.

I forgot, use CoCreateInstance on CLSID_StdComponentCategoryMgr ({0002E005-0000-0000-C000-000000000046}).
It has a ICatInformation interface.

Interesting, no I had not seen that. I'll check it out. Thanks!

np. You might want to filter those ending with ".encode", as those are for encoded scripts
and that isn't likely in CLI.