Retrieves the default user name, or the user name used to establish a connection
#include <WinNet.au3>
_WinNet_GetUser ( $sName )
$sName | Either the name of a local device that has been redirected to a network resource, or the remote name of a network resource to which a connection has been made without redirecting a local device. If blank, the system returns the name of the current user for the process. |
Success: | the user name. |
Failure: | sets the @error flag to non-zero. |
Search WNetGetUser in MSDN Library.