Advertisement
Guest User

Untitled

a guest
Jan 5th, 2015
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Option Explicit
  2. Const ADS_PROPERTY_UPDATE = 2
  3. Dim objSysInfo, objUser, objNetwork, strComputer, strDescription
  4.  
  5. Set objSysInfo = CreateObject("ADSystemInfo")
  6. Set objUser = GetObject("LDAP://" & objSysInfo.UserName)
  7.  
  8. Set objNetwork = CreateObject("Wscript.Network")
  9. strComputer = objNetwork.ComputerName
  10.  
  11. strDescription = "Logged on " & strComputer & " on " & Date
  12.  
  13. objUser.Put "description", strDescription
  14. objUser.SetInfo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement