Feb 13, 2004 #1 subendu Programmer Feb 13, 2003 41 US Can anyone give me a perl script to get the windows logon id? Thanks in advance. Subendu
Feb 13, 2004 #2 mikevh Programmer Apr 23, 2001 1,033 US The login id is one of the values in the %ENV hash. Try this Code: print qq($_ => $ENV{$_}\n) for (sort keys %ENV) to see what's in there. Upvote 0 Downvote
The login id is one of the values in the %ENV hash. Try this Code: print qq($_ => $ENV{$_}\n) for (sort keys %ENV) to see what's in there.
Feb 13, 2004 #3 raklet MIS Aug 19, 2003 370 US You can also use the Win32 module. Win32::LoginName() [CORE] Returns the username of the owner of the current perl process. Example: use Win32; $name = Win32::LoginName; Upvote 0 Downvote
You can also use the Win32 module. Win32::LoginName() [CORE] Returns the username of the owner of the current perl process. Example: use Win32; $name = Win32::LoginName;