I'd use the Win32 Module that comes with ActivePerl
$LoginName = Win32::LoginName
And just in case you need to check if the user is on NT
if ( Win32::IsWinNT )
{
#Do Stuff
}
--=Lolindrath=-- | [reply] [d/l] [select] |
I'm not sure how this works in NT, but if you use CGI.pm, you can get the username via $cgi_object->remote_user()
HTH //mikkoH | [reply] [d/l] |
Well two things:
In IIS, you need to require user authentication, otherwise, the machines will not send the authentication information, and then, if you have the Perl IIS mappings you can use the variable $Request->ServerVariables("REMOTE_USER")->Item which returns the authenticated user. That works in the actually ASP pages only. Running as a script, you may want to look into Win32::Eventlog and then send all page access to the EventLog running on your server. | [reply] [d/l] |
use CGI;
print $ENV{'REMOTE_USER'};
cheers,
ybiC | [reply] [d/l] |