Listing 4 Set usercntr=0 If not defined domres For /F "tokens=1,2,3,4,5 delims=\ " %%i in ('%UtilLoc%\psloggedon.exe -l \\%1 ^| find "/"') do SET /A usercntr+=1 If not defined domres For /F "tokens=1,2,3,4,5 delims=\ " %%i in ('%UtilLoc%\psloggedon.exe -l \\%1 ^| find "/"') do (SET domres=%%l) & (SET userres=%%m) & (Call :GetLOUInfo)