JavaScript中的Dos命令 - 将命令行参数传递给批处理文件 [英] Dos commands in JavaScript - pass command line arguments to batch file

查看:93
本文介绍了JavaScript中的Dos命令 - 将命令行参数传递给批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我想知道如何使用javascript运行dos命令。

我还需要运行带有两个命令行参数的批处理文件。这些命令行参数是变量。


谢谢


Raghu

解决方案

你好,


我能够使用vb脚本运行批处理文件。

展开 | 选择 | 换行 | 行号


< blockquote>查看此主题是否提供任何帮助。


我相信你知道使用JavaScript是不可能的,但是你可以使用ActiveX / vbscript来获得正确的IE解决方案好奇设置。


感谢您的回复。是否可以从vb脚本将值传递给批处理文件?

这些值基本上是需要设置的变化路径。


Hi,

I wanted to know how to run dos commands using javascript.
Also i need to run a batch file with two command line arguments. These commandline arguments are variables.

Thanks

Raghu

解决方案

Hi,

I was able to run a batch file using vb script.

Expand|Select|Wrap|Line Numbers


See if this thread offers any help.

I trust you know that this will not be possible with JavaScript, but you could use ActiveX/ vbscript for an IE-only solution with the correct security settings.


Thanks for the reply. Is it possible to pass values to the batch file from vb script?
The values are basically the path that needs to be set that varies.


这篇关于JavaScript中的Dos命令 - 将命令行参数传递给批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆