Thanks for the quick reply.

code:
shell '%COMSPEC% /C net start messenger'

Will not work since the service is DISABLED.

I searched around and found sc.exe from the NT resource kit which allows me to ENABLE the service and then start it.

code:
;start messenger service so we can alert user to reboot
shell "Z:\tools\sc config messenger start= auto"
shell "Z:\tools\sc start messenger"

;give it some time to start
sleep 5

$retcode=sendmessage(@WKSTA, 'Your computer has just been patched for the Mblast Virus.
Please reboot this computer AS SOON AS POSSIBLE and log in again.')

sleep 2
shell "Z:\tools\sc config messenger start= disable"
shell "Z:\tools\sc stop messenger"

I did a search on the UDF forum but couldn't find the "check if user is logged on" fuction.

Qui

[ 21. August 2003, 20:51: Message edited by: quihong ]