LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically accessing the Start Menu user display name in XP

Hi,

Is there a way to programmatically get the name that is displayed at the top of the start menu in windows xp?  I am not looking for the login username, but rather the displayed named.  The computers do not log into a domain and there is not an active directory server.

Thanks
John

0 Kudos
Message 1 of 6
(3,949 Views)
Try the attached VIs.
- Partha ( CLD until Oct 2027 🙂 )
Message 2 of 6
(3,932 Views)
Hi Partha,

on my WinXP both vis gave my logon name (but I'm logged on to a domain...).

Ever tried to program without massive use of locals and frames? Smiley Very Happy
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(3,916 Views)
Hi,
 
Thanks for your responses.  Unfortunately, I am looking to get the display name and not the user name.  So, on my machine the user name is something like "f-lastname" and the display name is "Firstname Lastname."  The display name is shown at the top of the startbar and also in Control Panel->User Accounts.
 
Thanks
John
0 Kudos
Message 4 of 6
(3,898 Views)
I'm not sure how the calls will differ between getting the User Name and the Display Name but this Developer Zone Example Program should provide you with a good start. It contains methods for programmatically obtaining user information for purposes of setting access privileges in a VI.
Cheers,
Emilie K. | Applications Engineer | National Instruments
0 Kudos
Message 5 of 6
(3,846 Views)
Hi,
 
Thanks for all the help.  I was able to access the information using a WMI query.  I have attached the vi that does it.  It uses .net 2.0.
 
Thanks
John
Message 6 of 6
(3,841 Views)