home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_2519 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  578 b   |  14 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import win32ts
  5. sessions = win32ts.WTSEnumerateSessions(win32ts.WTS_CURRENT_SERVER_HANDLE)
  6. for session in sessions:
  7.     if session['State'] == win32ts.WTSDisconnected:
  8.         sessionid = session['SessionId']
  9.         username = win32ts.WTSQuerySessionInformation(win32ts.WTS_CURRENT_SERVER_HANDLE, sessionid, win32ts.WTSUserName)
  10.         print 'Logging off disconnected user:', username
  11.         win32ts.WTSLogoffSession(win32ts.WTS_CURRENT_SERVER_HANDLE, sessionid, True)
  12.         continue
  13.  
  14.