S := 1; I := 1; while I <= Length(CommaExts) + 1 do begin if (I > Length(CommaExts)) or (CommaExts[I] = ',') then begin WMPRegMultimediaExts(Copy(CommaExts, S, I - S), PerceivedType, MIMEType, ExtDesc); S := I + 1; end; I := I + 1; end;