Output Windows username?

is there a way to output in Grasshopper the username of the user logged into the computer OR somehow extract the USERNAME in the UserObjects folder name…

Create a C# script component, use


thanks jesterKing…within the component, besides the “public static string UserName { get; }” code, is there any additional code that needs to be added or a “return” added, as I’m not getting an output currently. any help is much appreciated!

I couldn’t be bother to find out how to add new assemblies to C# scripting component, so I did it just with a Python component. No inputs, and only one output called username, and code:

import System.Environment as env

username = env.UserName

username.gh (4.8 KB)

awesome…worked perfectly…thanks!