This should work :

code:
$RdvDom=ReadValue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Service\MSNP32\NetworkProvider","AuthenticatingAgent")

? "$$RdvDom = $Rdvdom"
?

IF @error=0
goto $RdvDom
Endif

? "No active domain!!!"
?
exit
ENDIF

:TEST1
? " Logged on to Domain: TEST1 "
EXIT

It's bad logic because it will error out with 'label not found' if there is no fitting registry entry ...

[ 03 May 2002, 15:44: Message edited by: jpols ]
_________________________