Retrieving User information in VBScript

We have an issue where %userdomain% & %username% doesn’t resolve at all.

Therefore we found a “work-a-round”

Dim ntsys

Set ntsys = CreateObject(“WinNTSystemInfo”)

wscript.echo “User: ” & ntsys.UserName

wscript.echo “Computer: ” & ntsys.ComputerName

wscript.echo “Domain: ” & ntsys.DomainName

wscript.echo “PDC: ” & ntsys.PDC


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *