That really depends on how many that is. The idea of "$NonPrinterGrps" an "if instr($NonPrinterGrps, $Group)=0" is to quickly eliminate a group that will not be found in the Printers.ini file. If you do not include any groups in $NonPrinterGrps then the loop attempts to find the all groups in printers.ini. It won't find it and loops. The trick here is to find a balance I think. The true answer depends on which is less overhead the instr function or the ReadProfileString for all groups. You may have to test it each way to determine which is the fastest.

[ 29 March 2002, 23:04: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/