Playing with Computers
My 2cent tips & tricks on computer technology & Application Virtualization ...
Tuesday, March 9, 2010
Tips: Python: How to get the full username in Windows
import w
in32com,win32com.client,pythoncom
sDomain =
"ES"
sUser =
"
johrim
"
s
ADSPath= sDomain + sUser
oUser=win32com.client.GetObject(
"WinNT://%s,user"
% sADSPath )
print (
oUser.FullName)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment