Enabling JavaScript in Windows Script Host

John 506 Reputation points
2025-04-30T23:24:09.36+00:00

I am having trouble running JavaScript apps.

How would I include JavaScript engine using Windows Script Host?

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. S.Sengupta 24,476 Reputation points MVP
    2025-05-01T00:38:37.79+00:00

    You need to write your script with the .js file extension.

    Open a Text editor and copy-paste the following:

    // Simple WSH JavaScript example

    WScript.Echo("Hello from Windows Script Host!");

    Now open Command Prompt as Admin and run:

    cscript hello.js

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.