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 domain user. Here the code snippet-
{... snipped snippet ...] Does this reveal anything? <code> import _winreg import wmi reg = wmi.WMI (namespace="default").StdRegProv print reg.CheckAccess ( _winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList", _winreg.KEY_QUERY_VALUE | _winreg.KEY_ENUMERATE_SUB_KEYS ) result, sids = reg.EnumKey ( _winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" ) for sid in sids: print sid </code> On the other hand, WMI doesn't offer you much here: if you have a working solution via the Win32 API, then unless you need to do this on remote machines with specific credentials (which you can't do with the standard API) then perhaps you needn't try too hard... TJG _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32