cant' connect to remote machine using wmi [solved]

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • spens
    New Member
    • Oct 2006
    • 2

    #1

    cant' connect to remote machine using wmi [solved]

    os winxp

    Code:
    import wmi
    c = wmi.WMI(computer="10.1.1.1", user="name", password="pass")
    
    for host in c.Win32_ComputerSystem():
    ...... and so on
    error in c = wmi.WMI(compute r="10.1.1.1", user="name", password="pass" )

    Code:
      File "C:\Python25\Script1.py", line 2, in ?
        c = wmi.WMI(computer="10.1.1.1", user="name", password="pass")
      File "C:\Python24\lib\site-packages\wmi.py", line 1011, in connect
        handle_com_error (error_info)
      File "C:\Python24\lib\site-packages\wmi.py", line 160, in handle_com_error
        raise x_wmi, "\n".join (exception_string)
    x_wmi: -0x7ff8fffb - Îòêàçàíî â äîñòóïå.  (some troubles with encoding)
    on the local machine all works perfectly
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    Very cool... Where did you find the wmi module?
    have you tried u"username", etc?

    Comment

    • spens
      New Member
      • Oct 2006
      • 2

      #3
      Solved. User on remote machine were not in group Administrators.

      Comment

      • bartonc
        Recognized Expert Expert
        • Sep 2006
        • 6478

        #4
        Originally posted by bartonc
        Very cool... Where did you find the wmi module?
        have you tried u"username", etc?

        Comment

        Working...