I'm not a developer, though I write a lot of admin scripts, but I'd think if the domain was not specified then the domain of the current user could be attempted.
I don't know what the API would be, but in here is one way to do it in VBscript. (Yes, it is in bad form

)
wscript.echo WScript.CreateObject("WScript.Network").UserDomain
Instead of automatically trying with the domain, maybe the domain and backslash could be pre-loaded into the user field? It may make it easier for newbies.
Just a thought.
