Re: [python-win32] syntax?

2010-01-17 Thread Gowtham
Hi Alex, I understand your code but its very difficult to read in python if the indentation is not clear. Run through the Python style guide - http://www.python.org/dev/peps/pep-0008/ or Google's pyguide - http://google-styleguide.googlecode.com/svn/trunk/pyguide.html Typical indentation is 4 spa

Re: [python-win32] Invalid method parameters with UnjoinDomainOrWorkgroup

2009-12-22 Thread Gowtham
Hi Tim, Inline- On Tue, Dec 22, 2009 at 2:42 PM, Tim Roberts wrote: > Gowtham wrote: > > I am trying to unjoin a machine from the domain and attempted with the > > following code > > > > > > import wmi > > wm = wmi.WMI() > > wm.Win32_ComputerSys

[python-win32] Invalid method parameters with UnjoinDomainOrWorkgroup

2009-12-22 Thread Gowtham
ed. Error in: SWbemObjectEx -0x7ffbefd1 - Invalid method Parameter(s) I dont understand why its calling these Invalid method parameters. All that it wants is an (Int, Str, Str) when using thru Python otherwise it is (Str, Str, int) as described here. http://msdn.microsoft.com/en-us/

Re: [python-win32] Setting a netboot within windows OS

2009-12-22 Thread Gowtham
I will look if Lenovo Thinkpad provides any control to modify the BIOS parameters. Thank you all for your inputs :) On Tue, Dec 22, 2009 at 3:37 AM, Tim Golden wrote: > Vernon Cole wrote: > >> Gowtham: >> I waited before giving this answer, to let the real Windows Gur

[python-win32] Setting a netboot within windows OS

2009-12-18 Thread Gowtham
mode instead of local hard disk. Any pointers, appreciate it. Thanks, Gowtham N ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Problem with OLE error 0x80041002

2009-12-14 Thread Gowtham
Inline- On Fri, Dec 11, 2009 at 9:16 AM, Tim Golden wrote: > Gowtham wrote: > >> I have a python script that retrieves the user profile path from the >> registry using wmi. I am doing this way as win32net.NetUserGetInfo could >> not >> somehow find the domai

Re: [python-win32] Problem with OLE error 0x80041002

2009-12-10 Thread Gowtham
I have also tried with win32security instead of using wmi as mentioned in Tim Golden's post- import _winreg import win32security username = 'gowtham' sid = win32security.ConvertSidToStringSid(win32security.LookupAccountName(None, username)[0]) key = _winreg.OpenKey(_winreg.HKEY_L

[python-win32] Problem with OLE error 0x80041002

2009-12-10 Thread Gowtham
n handle_com_error x_wmi: -0x7ffbeffe - OLE error 0x80041002 I see that 0x80041002 is Object not found error but why is wmi not being able to find the object and what could be an alternative? Any tips, appreciated. Gowtham N ___ python-win32 mailing