I am at a dead end and cannot find a definitive answer. I am trying to get a list of network adapters through WMI. The team that I use works fine on almost all workstations in our office without any problems. Yesterday the problem. One machine is out of order. Since it runs directly on the user's computer, I do not need to explicitly specify the name of my machine and, therefore, use only "." for the local machine. Then I don't care about βwho,β so there is no impersonation. The user should be able to request their own equipment resources. What I used was ...
oWMIService = GETOBJECT("winmgmts:\\.\root\cimv2") oItems = oWMIService.ExecQuery("Select * from Win32_NetworkAdapter",,48)
From what I found, some places say to remove the "\" to refer to the machine path. If I do, MY machine will fail, but there will be no result on the other computer. So, I even tried just going to the root for the service, and that won't work either.
oWMIService = GETOBJECT("winmgmts:\\.")
The actual error I get is ...
Error Code: 0x800401ea: Moniker cannot open file.
I did a search on this error, but I donβt know how to get permission.
DRapp source share