这里的两个参数对于 WScript 意味着什么? [英] What does the two parameters mean for WScript here?

查看:18
本文介绍了这里的两个参数对于 WScript 意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run($cmd, 0, false);

我似乎没有找到有关此的文档...

I don't seem to find the document for this...

编辑

是否需要一些设置来启用它?我发现无论将第二个参数设置为 true 还是 false

Does it need some settings to enable it?I found the above script is not working whether setting the second parameter to true or false

推荐答案

Run(strCommand, [intWindowStyle], [bWaitOnReturn]) 

  • WindowStyle = 0 表示隐藏窗口并激活另一个窗口."
  • WaitOnReturn = false 表示Run 方法在启动程序后立即返回,自动返回 0(不会被解释为错误代码)."
  • Run 方法的完整文档在这里:http://msdn.microsoft.com/en-us/library/d5fk67ky%28VS.85%29.aspx

    The full documentation for the Run Method is here: http://msdn.microsoft.com/en-us/library/d5fk67ky%28VS.85%29.aspx

    这篇关于这里的两个参数对于 WScript 意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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