How can I script the following ?

If InGroup ("A") = 1
Run "\\....exe"
If InGroup ("B") = 1
Run "\\....exe"
If Not (InGroup ("A") or InGroup ("B"))
Run "\\....exe"