简体   繁体   中英

How to run shell command in JavaScript

How can I run shell command in javascript in code behind

I have this exe file on:

C:\\Program Files\\test.exe

that i want to run using javascript and I want to do it in codebehind or at least call this function from code behind.

The reason want to do it on code behind is that I have parameters need to pass them in the shell command.

For security reasons you can not run commands from JavaScript.

If you are using JScript, then

var shell = WScript.CreateObject("WScript.Shell");
shell.Run("command here");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM