We use a "Logon Batch file" that runs for all users when they login to the domain. It has a whole bunch of stuff in it, including a BUNCH of "ifmember statements" cascaded with "if not errorlevel 1 ...
You need <B>for</B>:<BR><pre class="ip-ubbcode-code-pre">Runs a specified command for each file in a set of files. FOR %variable IN (set) DO command [command ...