As far as I know, there was never an official version of the Windows Script Host for Windows CE, at least in the WinCE 1.0 to 4.0 days, Wikipedia is mixing stuff up.
The Windows Script Host uses ActiveScript engines, and these are available in CE, JScript and VBScript were available and used by many devices, as JScript is also the script engine for MSIE, and VBScript is the engine for the Pocket VB / eMbedded Visual Basic runtime.
However, the cscript.exe and wscript.exe were never ported to Windows CE.
The Active Scripting pieces that were available on Windows CE
(depending on platform features
):
- COM Automation
(WinCE supported in-proc-only COM or full DCOM, depending on selected platform features
), IDispatch and IDispatchEx for Automation objects are supported in both.
- JScript and VBScript, the two Microsoft script engines, identical features as on NT except for lack of active-debugging.
- MSIE can use any ActiveScript engine to run script blocks found in pages.
- MSHTA can run local HTML apps with a higher level of trust
(same as on the desktop, not safe-for-web objects can be used in MSHTA
), this was available in Platform Builder, but most OEM didn't know what it was for and would not include that feature.
- ADOCE, a Windows CE version of the ActiveX Data Objects, to access OLEDB providers through Automation.
- eMbedded Visual Basic: This is a WinCE-only thing, but eVB really is a VBScript host providing forms objects to a script, so it can be used to handle other COM Automation objects as well just like WSH.
I have even worse news, I'm lying a bit when I say WSH was never ported... I rewrote it back in the days
(somewhere around 2004-2008
), as I wanted the same thing as you.
I had cscript.exe, wscript.exe, as well as wshom.dll with implementations of "Scripting.FileSystemObject", "WScript.Shell", and "Scripting.Dictionary" objects... all working, even the ability to capture CUI apps and script them using WshShell.Exec.
That's why I'm pretty confident it wasn't officially ported by Microsoft because I would have compiled it from Platform Builder instead of rewriting the whole thing.
And now for the bad news... I lost all of it in a massive crash around 15 years ago, and it was never published for the public so I don't think there is any copy anywhere.
I have a bit of good news though... there is a way to run WSH-like scripts interactively on WinCE.
Try this one out:
https://www.hpcfactor.com/scl/2307/Philippe_Majerus/Majerus.net_Active_Shell/version_1.0
It's based on the same technologies, but letting you interact with the script interactively instead of batch-like execution of .js or .vbs files like WSH does.
Edited by PhMajerus 2024-03-03 2:41 AM