On 22 déc, 19:37, Toff <christophed...@gmail.com> wrote: > On 22 déc, 18:59, Jens Henrik Leonhard Jensen > > <j...@statsbiblioteket.dk> wrote: > > Toff wrote: > > >   d = c.Win32_ComputerSystem > > >   d.JoinDomainOrWorkGroup(None, 3, "mydom", "mydompw", r"admin\\mydom") > > > Shouldn't r"admin\\mydom" be "admin\\mydom" or r"admin\mydom". > > Or maybe just "admin" > > > /Jens Henrik > > you are right but i've got the same error.
the more i look at my script the more i think it s a BUG. #ALL works great import wmi c = wmi.WMI() for computer in c.Win32_ComputerSystem(): if computer.PartOfDomain: print computer.Domain #DOMCD print computer.SystemStartupOptions # (u'"Microsoft Windows XP Professionnel" /noexecute=optin /fastdetect',) #error message computer.JoinDomainOrWorkGroup('DOMCD', 'adminLocal', 'admin\ \DOMCD',None,3 ) ############## DOMCD (u'"Microsoft Windows XP Professionnel" /noexecute=optin / fastdetect',) Traceback (most recent call last): File "integrdom.py", line 51, in <module> main() File "integrdom.py", line 13, in main joindom() File "integrdom.py", line 47, in joindom computer.JoinDomainOrWorkGroup('DOMCD', 'adminLocal', 'admin\ \DOMCD',None,3 ) File "c:\Python25\Lib\site-packages\wmi.py", line 493, in __getattr__ handle_com_error (error_info) File "c:\Python25\Lib\site-packages\wmi.py", line 189, in handle_com_error raise x_wmi, "\n".join (exception_string) wmi.x_wmi -- http://mail.python.org/mailman/listinfo/python-list