Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting NT 'Full Name'
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00269336
Message ID:
00269519
Views:
17
>How can I get the Full Name (as seen in the NT user manager) for use in my applications? Will it be different for Win9x?
>
>Please note - I'm not referring to the 'User Name', which is the login name.
>

Under NT, the NetUserGetInfo() at level 2 returns a structure that contains a pointer to the Full Name. This API call is not available under Win9x.

If an NT (or Win9x) system is logged into an NT domain, the information can be retrieved using Microsoft's ADSI component, which can be downloaded from Microsoft. I've been laid up recently, and had the opportunity to read a good reference on ADSI , ADSI ASP Programmer's Guide by Stephen Hahn, from WROX Press (they also have a good book out on the WSH now.) While it's ASP oriented, the guide shows how to use the ADSI component to do things; Rick Strahl's www.west-wind.com has a good whitepaper on using ADSI with VFP.

You could also write a COM component that ran on an NT system to execute a NetUserGetInfo() call and access it via DCOM.

I don't believe that Win9x without an NT system can provide that information, although the name of the registered owner of the system 9as opposed to the current user) is available in the registry.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform