Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 290 Vote(s) - 3.56 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Equivalent of UNIX `exec` in JScript / Windows Script Host

#1
I've got a .js file that's meant to be executed by Node.js on the command-line. I've got everything set up with `npm` and such to put the file into the user's path as a "bin". My problem is, because the file ends in .js, running it from the command line is shipping it off to the JScript-based Windows Script Host, instead of node, as expected.

I'm trying to write a JScript wrapper, to sit at `myprogram.js`, be executed by Windows Script Host, and ship off to Node.js. Unfortunately, it doesn't seem like WScript's `Exec` command behaves like the UNIX exec command:

var shell = new ActiveXObject("WScript.Shell");
var proc = shell.exec("node .\\Library\\executable.js");

while (proc.Status === 0) {
WScript.Sleep(100);
}

WScript.Echo(proc.Status);

This buffers the program's output, and exposes it via some sort of JScript `WshScriptExec` object.

I need a script, or a feature, or some other way, to hand *the entire terminal* over to the command-line script I'm launching. Most usefully, I'd like to replace the JScript process that's executing, with the process for the command that I'm executing (i.e. UNIX-`exec`-y behaviour.) Is there any way to do this, or some other way to solve my problem?
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through