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_LOCAL_MACHINE, r"S

[python-win32] Problem with OLE error 0x80041002

2009-12-10 Thread Gowtham
Hi All, 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 domain user. Here the code snippet- def GetProfilePath(username): pythoncom.CoInitialize() try: reg = wmi.WMI

Re: [python-win32] Files in clipboard with DropEffect?

2009-12-10 Thread Mark Hammond
I think I made that more complicated than necessary - you can probably perform the exact same steps using just win32clipboard - the key is checking is that clipboard format is available, getting the data, then using struct to convert it to an int. Mark On 11/12/2009 11:28 AM, Mark Hammond wro

Re: [python-win32] Files in clipboard with DropEffect?

2009-12-10 Thread Mark Hammond
On 10/12/2009 5:05 PM, Stuart Axon wrote: Hi, I made the a script to manipulate files copied into the clipboard from explorer. To know if the file was cut or copied it seems need to get information about the DropEffect - is there a way to do this from win32clipboard ? I think you want to l