[python-win32] Accessing properties of share on DFS

Tim Golden mail at timgolden.me.uk
Mon Sep 1 18:13:20 CEST 2008


Michael Kesper wrote:
> Hi,
> 
> * Tim Golden <mail at timgolden.me.uk> [2008-08-27 14:35:37 +0100]:
>  
>> You might be able to get there with WMI. The following
>> works on my own machine, but I'm not sure what machine
>> you'd need to access to list the DFS shares. I'll see
>> if I can persuade a friendly admin here to let me try
>> things out:
> 
> Thanks for your answer. I try to try it. ;)
> I can access the DFS share properties via mmc from one special server,
> so I think I'll need to run my scripts there.
> As you probably guessed, there's no python installed there.

That's not problem. The great thing with WMI is
that it's installed *everywhere* and by the glory
of DCOM (!) using it is a breeze. Just take that code
snippet and change the line:

  c = wmi.WMI ()

to:

  c = wmi.WMI ("other-machine-with-dfs")

and Bob's your Uncle.

TJG


More information about the python-win32 mailing list