Skip to content

A Node.js package that runs Windows Scripting Host (WSH) as a sub-process and exposes the resources from the WSH world to the Node.js world through serialized communication over the standard input and output channels.

License

Notifications You must be signed in to change notification settings

arcticnotes/node-wsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node-WSH Bridge

This is a Node.js libary that runs Windows Scripting Host (WSH) as a child process and exposes the resources from the WSH world to the Node.js world through serialized communication over the standard input and output channels. Obviously, it only works on Windows.

Usage

To install:

$ npm install @arcticnotes/node-wsh

In JavaScript code:

import {WindowsScriptingHost} from '@arcticnotes/node-wsh';

const WSH = await WindowsScriptingHost.connect();
const WScript = WSH.global( 'WScript');
console.log(WScript.Version);
await WSH.disconnect();

Dependencies

  • Node.js release 20.x or higher is required.
  • Windows Scripting Host is required. Version compatibility is unclear. Please report issues.
    • Version 5.812 is known to work.
  • Dependency libraries included by package.json:

License

This library is shared under the MIT License. See the LICENSE file for details.

This library includes json2.js, an implementation of JSON, donated by Douglas Crockford (the designer of JSON) to the public domain. The license aforementioned does not apply to this file.

About

A Node.js package that runs Windows Scripting Host (WSH) as a sub-process and exposes the resources from the WSH world to the Node.js world through serialized communication over the standard input and output channels.

Resources

License

Stars

Watchers

Forks