Saturday, October 13, 2012

QTP - wscript - How to display Current User Name?

Dim WshShell
Dim WshNetwork
Set WshShell = CreateObject( "WScript.Shell" )
Set WshNetwork = CreateObject( "WScript.Network" )

dummy_user = WshNetwork.UserName
WshShell.Popup dummy_user, 10, "User Name"

Set WshShell = Nothing
Set WshNetwork = Nothing

1 comment:

  1. thanks for sharing! BTW, I also have a blog and a web directory, would you like to exchange links? let me know on emily.kovacs14@gmail.com

    ReplyDelete