Getting the Windows User Name in LabVIEW

Updated Sep 9, 2024

Reported In

Software

  • LabVIEW

Operating System

  • Windows

Issue Details

How to get the current logged Windows User Name in LabVIEW?

Solution

  • If you only need the Windows user name, then the following code will suffice:
option1.png
  • If you would like to include the domain along with the Windows user name in the resulting string, then the following code will be best:
option2.png
  • Or you can use System Exec VI to include the domain as well by using the whoami command in the command line input.
option3.png
Tariff Impact Update Learn more

Was this information helpful?

Yes

No