Set wshshell = CreateObject("wscript.network") hostname=wshshell.username msgbox hostname