是否可以将 WMI 作为本地系统进行查询?
是否可以将 WMI 作为本地系统帐户进行查询?我尝试通过创建 本地系统实例来测试这一点Internet Explorer,并运行 WMI其中的工具。我收到一条错误消息:
无法确定核心 WMI 组件版本号
当我从普通用户帐户运行它时,它工作正常。我是 WMI 新手,那么这是否有根本原因?
Is it possible to query WMI as the Local System account? I tried to test this out by creating a Local System instance of Internet Explorer, and running WMI Tools from it. I got an error saying that:
The core WMI components build number could not be determined
This works fine when I run it from my normal user account. I'm new to WMI, so is there a fundamental reason why this would not be possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
WMI 可以从任何系统帐户运行,它不依赖于帐户。您可以从 DOS 命令提示符运行其他系统帐户的 WMI 查询,例如以下 DOS 命令(查询当前操作系统设置):
注意: 替换
使用您要运行命令的帐户。其他工具,如 rcmd 或 psexec 可以运行命令,也值得一试。
虽然 WMIC 可以从命令行执行,但在高级编程语言中使用 WMI 时,它的使用确实变得更加复杂。
WMI can be run from any system account, it's not account dependant. You can run WMI queries for other systems accounts from a DOS command prompt for example like the following DOS command (that queries current OS settings):
Note: replace
<account_name>
with the account you want to run command as.Other tools like
rcmd
orpsexec
can run commands as well worth checking out.Although WMIC can be executed from command line, utilising WMI does become more complex when utilising it in advanced programming languages.
创建 Internet Explorer 的本地系统实例
我想我将会做噩梦数周。
不管怎样,我们有在本地系统下的服务中运行的代码来查询 WMI,并且它工作得很好。
creating a Local System instance of Internet Explorer
I think I am going to have nightmares for weeks.
Anyway, we have code that runs in a service under Local System that queries WMI and it works just fine.