|the only way I know is to have the remote run a client-side registry dump of key HKLM\Network\Logon and pull the data from key "username". I'm sure there are better ways but i don't know them. Also, that only applies to winME, so I'm not sure where winXP puts it in the registry. (Run regedit and search for your own username, note where it appears, log off and relog as diff. user and look for that username etc.)|
client-side batch script:
reg export test "HKLM\Network\Logon"
copy test \\myserver\workdir\whois
for /f "tokens=1-3" in (workdir\whois) do (
if /i "%%~a" equ "username" (
this is very rough sketch, my Xp klunker just crapped out so i can't test anything.