home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch20 / scripts / names.vbs < prev    next >
Encoding:
Text File  |  1996-05-12  |  245 b   |  7 lines

  1. Set WNet = Wscript.CreateObject("Wscript.Network")
  2. On Error Resume Next
  3. Txt = "Domain Name " & WNet.UserDomain & vbCrLf
  4. Txt = Txt & "Computer Name " & WNet.ComputerName & vbCrLf
  5. Txt = Txt & "User Name " & WNet.UserName & vbCrLf
  6. MsgBox Txt
  7.