热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

从VBS取消WMI查询-CancelaWMIqueryfromVBS

IstheresomewaytocancelarunningWMIqueryfromaVBSscript?有没有办法从VBS脚本中取消正在运行的WMI查询?IfIc

Is there some way to cancel a running WMI query from a VBS script?

有没有办法从VBS脚本中取消正在运行的WMI查询?

If I create a WMI object and I make a query... Can I set a timeout or something like it so it stops after 25secs for example?

如果我创建一个WMI对象并进行查询...我可以设置超时或类似的东西,以便它在25秒之后停止吗?

Thanks a lot!

非常感谢!

1 个解决方案

#1


You can set a timeout for the entire script when launching it:

您可以在启动时为整个脚本设置超时:

cscript //T:10 C:\path\to\your.vbs

but as far as I know setting a timeout for a WMI call is not possible.

但据我所知,设置WMI呼叫的超时是不可能的。


推荐阅读
author-avatar
喵喵方小幺
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有