Hi everybody,
I'm not sure this post belongs to this section, if so I would apologize.
I'm trying to get the computer description by computer name. The problem is; I get this error "Cannot create ActiveX component" when the following codes run, while the variable ComputerName sets to another computer name in the network except the local computer that the code is running in it.
Dim Obj As Object = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & ComputerName & "\root\cimv2").ExecQuery("Select * FROM Win32_OperatingSystem")
For Each obj1 In Obj
ComputerDesc = obj1.description()
Next
When the ComputerName is the local computer name everything is fine, but when I use another computer name in my network an error occures in the line "Dim Obj as Object = GetObject(...", as Cannot create ActiveX component!
Appreciate any suggestion or help beforehand.
I'm not sure this post belongs to this section, if so I would apologize.
I'm trying to get the computer description by computer name. The problem is; I get this error "Cannot create ActiveX component" when the following codes run, while the variable ComputerName sets to another computer name in the network except the local computer that the code is running in it.
Dim Obj As Object = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & ComputerName & "\root\cimv2").ExecQuery("Select * FROM Win32_OperatingSystem")
For Each obj1 In Obj
ComputerDesc = obj1.description()
Next
When the ComputerName is the local computer name everything is fine, but when I use another computer name in my network an error occures in the line "Dim Obj as Object = GetObject(...", as Cannot create ActiveX component!
Appreciate any suggestion or help beforehand.