WMI: what am I doing wrong? 
Author Message
 WMI: what am I doing wrong?

Hello,

I am writing a small program in VB to get information about Services running
on a remote computer on a  local network.
While testing, I am trying to run this program on Windows 98, to get
information about computer running Windows 2000. Unfortunately I always get
automation error. You'll say user doesn't have enough permissions. So to
check that, I use WBEMTEST.EXE  on computer with WIN98. Everything works
just fine: I can connect, I can get information from WIN2000. So what am I
doing wrong here? Any ideas? There is a source code of the program I am
speaking about:

Private Sub Form_Load()
Dim services As WbemScripting.SWbemServices
Dim objectSet As WbemScripting.SWbemObjectSet
Dim object As WbemScripting.SWbemObject
Set locator = CreateObject("WbemScripting.SWbemLocator")
Set services = locator.ConnectServer("win2000ServerName", "root\cimv2",
"userName", "psw")
services.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate
Set objectSet = services.InstancesOf("Win32_Service")
For Each object In objectSet
       Set Item = ListView1.ListItems.Add(, , object.Name)
       Item.SubItems(1) = object.State
Next object
End Sub



Sat, 24 Jan 2004 01:04:07 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. WMI: what am I doing wrong?

2. onkeypress - what am i doing wrong

3. newbie - what am I doing wrong?

4. What am I doing wrong?

5. What I am doing wrong.

6. exitserver and settransfer, what am I doing wrong?

7. What am I doing wrong here?

8. What am i doing wrong here????? HELP

9. Recordset object, what am i doing wrong?

10. What am I doing wrong??

11. What am I doing wrong?

12. Ok, now what am i doing wrong?

 

 
Powered by phpBB® Forum Software