View Single Post
  #5  
Old 10-25-2012, 02:25 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi Adrian,

Thanks for the update. A quick internet search says that the following should work for Perl, but I have not tested it:
Code:
win32api.GetUserName()
For those interested in other languages, here are a couple of VBScript examples that are known to work:
Code:
Set objNetwork = CreateObject("wscript.network")
MsgBox objNetwork.UserName & "@" & objNetwork.UserDomain
Code:
Set objShell = CreateObject("wscript.shell")
set objEnv = objShell.Environment("PROCESS")
MsgBox objEnv("USERNAME") & "@" & objEnv("USERDOMAIN")
Here is a Python example that works as well:
Code:
import getpass
crt.Dialog.MessageBox(getpass.getuser())
We will post to this thread if we add the ability to make custom dialogs in a future SecureCRT release.

If you would like to be notified directly, please complete and submit the form at the following location:
Submit Feature Request
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote