Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7687521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:43:19+00:00 2026-05-31T19:43:19+00:00

Can I execute a program from a JScript script in such a way that

  • 0

Can I execute a program from a JScript script in such a way that the out put of the executed program will be written to the current console?

Currently I am using Shell.Application.ShellExecute and it is opening another new console for the executed application.

The JScript in my case is a wrapper around a compiler which is executed with the ShellExecute. So what happens is that all the compiler errors are lost because they are printed in another console.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:43:21+00:00Added an answer on May 31, 2026 at 7:43 pm

    If all you are worried about is capturing your compiler output then you can redirect the output to a file (I suggest both stdout and stderr). Something like this:

    var shell = new ActiveXObject("WScript.Shell");
    shell.Exec('YourCommand 1>yourOutput.txt 2>&1 ')
    

    If you really want to see the ouptut in your current console window (I don’t blame you), then you can use this:

    var shell = new ActiveXObject("WScript.Shell");
    WScript.StdOut.Write( shell.Exec('YourCommand 2>&1').StdOut.ReadAll() );
    

    Note – if your command has the potential for asking for input, then you must provide input via a pipe or redirection in the command string (or you could redirect input to nul). Otherwise the program will hang.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for a way to execute ABAQUS (a program) automatically from a
How can I execute an external program like an exe file? I want to
As we can execute such executables in two ways, such as sudo mono test.exe,
Python has a flag -O that you can execute the interpreter with. The option
What do you call a programming language that can execute its own code (passed
My goal is to have an AsyncTask that can execute multiple times (one task
I am trying to execute a program from the Java code. Here is my
I am currently writing my own shell program. This simple shell can just execute
I have written a java program that tests the speed of a couple of
I'm attempting to execute a .NET (3.5) command line program from within a VBScript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.