这里的两个参数对于 WScript 意味着什么?
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run($cmd, 0, false);
我似乎没有找到这方面的文档...
编辑
是否需要一些设置来启用它?我发现上面的脚本不起作用是否将第二个参数设置为true< /code> 或
false
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run($cmd, 0, false);
I don't seem to find the document for this...
EDIT
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
运行方法的完整文档在这里:
http://msdn.microsoft.com/en-我们/库/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
有关完整详细信息,请参阅此处。
Run
的第二个参数是窗口样式(最小化、最大化等),第三个参数是是否等待程序完成后再继续。第一个当然是要运行的程序。并复制此处的信息以使答案独立:
窗口样式有:
See here for full details. The second argument to
Run
is the window style (minimised, maximised, etc) and the third is whether to wait for the program to complete before continuing. The first is, of course, the program to run.And copying the information here to make the answer self-contained:
The window styles are:
引用上面的参考文献:
To quote from the above reference: