Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# User Name vs VFP User Name
Message
General information
Forum:
C#
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01675446
Message ID:
01675649
Views:
66
Environment.GetEnvironmentVariable("username")

works for me.

>Hi,
>
>I find that it is much easier to get username currently logged into the PC using VFP and C#.
>
>In VFP a call to GetEnv("UserName") returns the username of the person currently logged into the PC. Works well.
>
>In C# using Environment.UserName returns the name of the server. Same value no matter who is logged in.
>
>How could I get the username using C#?
>
>TIA

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform