[EMAIL PROTECTED] wrote:
> On Jul 11, 11:59 pm, [EMAIL PROTECTED] (Rob Dixon) wrote:
>> Amit Saxena wrote:
>>
>>> On Fri, Jul 11, 2008 at 8:39 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
>>>> [EMAIL PROTECTED] wrote:
>>>>> Can you please advice me how to get the Clients' windows logon user
>>>>> name in perl?
>>>>   $ENV{USERNAME}
>>> Using environment variables to find username are risky !
>>> Is there any API available for the same?
>> (Please bottom post your replies to this group. Thanks.)
>>
>> use Win32;
>>
>> my $user = Win32::LoginName;
>>
>> Rob
> 
> Hi Rob,
> 
> It show "SYSTEM" when I user my $user = Win32::LoginName;, I logon my
> windows with user name, but it show "SYSTEM" instead of my window user
> name.
> 
> When I try user $ENV{USERNAME}, it show null.
> 
> Please advice.

How is this Perl programming being run? It looks like it's a CGI program or
being run from a scheduler, in which case the process doesn't belong to any
individual user.

What are you trying to achieve by establishing the user name?

Rob

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to