Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8429573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:22:32+00:00 2026-06-10T05:22:32+00:00

I have been using User::pwent to get the full name of the system user

  • 0

I have been using User::pwent to get the full name of the system user in Perl:

require User::pwent;
my $full_name = (User::pwent::getpwnam(getlogin)->gecos)[0];

However, getpwnam is not implemented in Windows Perl. What’s the alternative to get the user’s full name on Windows? Is it available?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:22:33+00:00Added an answer on June 10, 2026 at 5:22 am

    Poked around, best thing I could find is to use Win32API::Net::GetUserInfo():

    require Win32API::Net;
    Win32API::Net::UserGetInfo( '', $self->sysuser, 10, my $info = {} );
    my $full_name = $info->{fullName};
    

    Need to get it running on a few Windows boxes though, to make sure it works.


    Update: Confirmed to work with user info level 10:

    > perl -MWin32API::Net -E "Win32API::Net::UserGetInfo('',Win32::LoginName(), 10, my $info = {} ); say $info->{fullName}"
    Bartholomew Simpson
    

    Not sure why 1011 does not work as documented, but this is good enough for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using Application.Caller in a comparison in my code. When a user
I have been considering the problems arising with user authentication, using sessions/cookies and the
Previously for all our asp.net applications we have been using a sysadmin user within
I have been using the HttpRuntime Cache for caching simple user preferences on an
I have been trying to figure out driving directions using user input and it
I have been using the function getText() to read user Input in MyJTextField Until
I have been using JSF1.2 for login pages. If the user sits on the
So I have been using raphael to create a user interface and want it
I have been using a custom template file called user-profile.tpl.php for a while. But
I am using asp.net 2.0. I have been using asp.net membership provider for user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.