//echo -a $wmiget(Win32_OperatingSystem).RegisteredUser
This will return the user that windows is registered to, but is it any way to get the name of the user logged on to the computer (using it now?), i tryed to find a solution online, but couldn't get what to use instead of "RegisteredUser", someone that know? Thnx