|
Hello all, I need to send network messages to the users in a given NT 4 Domain group. Example: send a "Attention - New MKT campaign" to all users in the DEP_MKT global group .
The piece of code bellow, does exactly that . But I got a problem.... If a user (from that group) is not logged in, the sendmessage function get stucked and the remainning users receive nothing .
Well, thought about 2 options : a) A function that would return me if a given user is currently logged in b) A timeout function that would abort sendmessage execution
Any idea ?
Rds
Rogerio
Function Groupmembers($target, $group, optional $flag)
$group = getobject("WinNT://$target/$group") for each $member in $group.members $nome = $member.name ? $nome sleep 1 $ReturnCode = sendmessage($nome,"teste de envio para grupos") ? $ReturnCode next
endfunction
;----------------------------------
break on
$members = groupmembers("Brazil","DEP_MKT",2)
|