Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

net view /domain

68 views
Skip to first unread message

use...@mail-2-me.com

unread,
Aug 11, 2005, 10:38:06 AM8/11/05
to
Hi!

Is there a module I can use for "net view /domain" so list all
available domains and workgroups in a windows-network? I'm looking for
something like win32net.NetServerEnum, because I don't really want to
do this by "popen".

Kind regards
Dirk

Tim Golden

unread,
Aug 11, 2005, 10:46:36 AM8/11/05
to pytho...@python.org
[use...@mail-2-me.com]

I think this will do it. (The WinNT object hierarchy usually
repays a look; I keep forgetting it's there).

TJG

<code>
import win32com.client

network = win32com.client.GetObject ("WinNT:")
for group in network:
print group.name

</code>

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

use...@mail-2-me.com

unread,
Aug 12, 2005, 3:23:58 AM8/12/05
to
Hi Tim!

Thanks again for your help!

I just tried it out and it does exactly what I want it to do :-)

Have a nice day!
Dirk

0 new messages