Popular recipes by Wolfgang Strobl http://code.activestate.com/recipes/users/109628/2001-07-22T08:29:04-07:00ActiveState Code RecipesGet user info on Windows, for current user (Python)
2001-07-22T08:29:04-07:00Wolfgang Stroblhttp://code.activestate.com/recipes/users/109628/http://code.activestate.com/recipes/66314-get-user-info-on-windows-for-current-user/
<p style="color: grey">
Python
recipe 66314
by <a href="/recipes/users/109628/">Wolfgang Strobl</a>
(<a href="/recipes/tags/network/">network</a>).
</p>
<p>Calling win32net.NetUserGetInfo(None, win32api.GetUserName(), 1) works for users logged in to the local machine, only, but fails for domain users. The snippet below demonstrates how to query the domain controller if there is one.</p>
Scour Microsoft Windows registry for a list of name server addresses (Python)
2001-07-19T18:15:40-07:00Wolfgang Stroblhttp://code.activestate.com/recipes/users/109628/http://code.activestate.com/recipes/66260-scour-microsoft-windows-registry-for-a-list-of-nam/
<p style="color: grey">
Python
recipe 66260
by <a href="/recipes/users/109628/">Wolfgang Strobl</a>
(<a href="/recipes/tags/network/">network</a>).
Revision 3.
</p>
<p>A utility function somewhat similar to what parsing resolv.conf for nameserver entries would do on Unix.</p>
Environment manipulation on Windows NT or Windows 2000 (Python)
2001-05-23T10:41:10-07:00Wolfgang Stroblhttp://code.activestate.com/recipes/users/109628/http://code.activestate.com/recipes/55993-environment-manipulation-on-windows-nt-or-windows-/
<p style="color: grey">
Python
recipe 55993
by <a href="/recipes/users/109628/">Wolfgang Strobl</a>
(<a href="/recipes/tags/sysadmin/">sysadmin</a>).
Revision 2.
</p>
<p>Display environment variables, then append C:\ to PATH. Example program, uses _winreg.</p>