[Solved] Can Windows Script Host run a .js file [closed]


Presumably, the goal is to edit the JavaScript file.

  1. Open your prefered editor. e.g. Visual Studio Code, Sublime Text, Atom or Brackets.
  2. Pick “Open” from the “File” menu
  3. Pick your JS file from the dialog

At some point you may wish to configure your file manager (e.g. Windows Explorer or macOS Finder) to open JS files in your editor of choice by default.


To run a JS file will depend on what environment it is designed to run in. e.g. JS embedded in a web page is run by linking to it with a <script> element in an HTML document and then opening that document in a web browser, while a command line program designed for use with Node.js is generally run with node XXXXXXX.js on the command line or via npm and a package.json configuration. Photoshop plugins are different. Server-side JS in classic ASP is different again. And so on.

11

solved Can Windows Script Host run a .js file [closed]