AddCount := 1; I := PosEx(';',Exts,1); while I > 0 do begin P := I; if (WMPCount+AddCount) = WMPOpenMaxExt then break; Inc(AddCount); I := PosEx(';',Exts,P); end; if I > 0 then Delete(Exts,P,Length(Exts) - P + 1);