Jens has it pegged exactly. Enum through the HKCU\Network key and look for your share in the RemotePath key, then pull the username from the UserName entry.