Since you sent this post to ASP related mailing-list, I suppose this
a part of an ASP file. In this case, I don't think you could do like
for two reasons:
1) WScript isn't available in ASP context. It's only for WSH context.
2) MsgBox isn't available in ASP server-side either.
> -----Message d'origine-----
> De : Kruschev Balcora [mailto:balcora@y...]
> Envoy=C3=A9 : mercredi 4 d=C3=A9cembre 2002 06:10
> =C3=80 : Pro ASP HowTo
> Objet : [proasp_howto] Windws Scripting
> i have this script that gets the current user logged on in
> windows. the
> problem is it doesnt return anything. can somebody help? thanks.
> <Script Language=3D"VBScript">
> On Error Resume Next
> Dim objNet
> Set objNet =3D CreateObject("WScript.Shell")
> Dim strInfo
> strInfo =3D "User Name is " & objNet.UserName & vbCRLF & _
> "Computer Name is " & objNet.ComputerName & vbCRLF & _
> "Domain Name is " & objNet.UserDomain
> MsgBox strInfo
> Set objNet =3D Nothing