How do I find out valid script machine names for CScript.exe // E: engine parameter?
When you execute a file with .VBS, .JS, or .WSF extensions through CScript.exe, they are executed correctly:
CScript vbsProg.vbs
CScript jsProg.js
CScript wshScript.wsf
However, we can use the // E: engine option to run VBS or JScript files with different extensions:
CScript //E:VBS vbsProg.txt
CScript //E:JScript jsProg.txt
Is there a way to do the same with a WSF file?
CScript //E:WhatGoesHere wshScript.txt
Is there a place where the script engine names are documented? Is there a way to find out the names of all installed motors?
Thank!
Antonio
source to share
[EDIT] After reading Ekkehard Horner's comment, I decided to cross out my first sentence about the // E switch.
WSF itself is a batch job file that can contain scripts in different languages, for example:
<package>
<job>
<script language="VBScript">
WScript.Echo "Echo from VBScript"
</script>
<script language="JScript">
WScript.Echo("Echo from JScript");
</script>
<script language="XYZ">
//where XYZ s`d be a valid name of installed language
</script>
</job>
</package>
And //E
generally not applicable to WSF files. CScript only recognizes them by their extension, which means that the only way to run WSF through CScript is:
CScript ScriptName.WSF
source to share