C
Charlotte E
Hi all,
I have this small script to get the domain of the PC:
______________________________________________________________________
Dim WMIService As Object
Set WMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\.\root\cimv2")
Dim WindowsQuery As Object
Set WindowsQuery = WMIService.ExecQuery("Select * from
Win32_ComputerSystem")
Dim PC As Object
Dim PD As String
For Each PC In WindowsQuery
PD = PC.Domain
Next
______________________________________________________________________
But, on computers it work, and on other computers, the script return runtime
error 430 in the "For Each PC" line?!?
All computers are running "WinXP Pro 32-bit"???
And it doesn't matter, if I'm requesting Domain or other PC information - it
still work on some computers, and not on others?!?
What am I missing???
TIA...
I have this small script to get the domain of the PC:
______________________________________________________________________
Dim WMIService As Object
Set WMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\.\root\cimv2")
Dim WindowsQuery As Object
Set WindowsQuery = WMIService.ExecQuery("Select * from
Win32_ComputerSystem")
Dim PC As Object
Dim PD As String
For Each PC In WindowsQuery
PD = PC.Domain
Next
______________________________________________________________________
But, on computers it work, and on other computers, the script return runtime
error 430 in the "For Each PC" line?!?
All computers are running "WinXP Pro 32-bit"???
And it doesn't matter, if I'm requesting Domain or other PC information - it
still work on some computers, and not on others?!?
What am I missing???
TIA...