我正在尝试运行一些基于OS和x86与x64的命令。运行以下代码时,变量保持空白。我可以回显输出,看看查询和属性似乎是正确的。知道为什么不给这个字符串分配名为osbit
的变量?
strOSbit = "SELECT * FROM Win32_Processor"
Set colItems = objWMIService.ExecQuery(strOSbit, "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
Set osbit = objItem.AddressWidth
Next