监视器的序列号
我可以使用PowerShell命令从所有附加的显示器中获取序列号:
get-wmiobject wmimonitorid -namespace root\wmi|foreach-object{($_.SerialnumberID|foreach-object{[char]$_}) -join „“}
是否可以使用VBA执行此操作?
我的目的是将序列号添加到Excel(每个单元格一个序列号)。
I can get the serial numbers from all attached monitors with the Powershell command:
get-wmiobject wmimonitorid -namespace root\wmi|foreach-object{($_.SerialnumberID|foreach-object{[char]$_}) -join „“}
Is it possible to do this with VBA?
My intention is to add the serial numbers to Excel (one serial number per cell).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要将WMI脚本库添加到
可以更改debug.print的引用中。要通过使用
dim s作为字符串
和s = s = s + chr(c),将其添加到某些单元格中;
you will need to add WMI scripting library to the references
You can change debug.print to add to certain cells instead, by using
Dim s as String
ands = s + chr(c);