The invention relates to compositions for treating a hard surface, in particular for cleaning and/or dirt-repellent treatment of a hard surface, containing a) at least one multi-armed silyl polyalkoxylate of the formula (I) (H-A)n-Z-[A-B—Si(OR1)r(R2)3−r]m (I), where Z is a (m+n)=valent radical having at least three carbon atoms, A is a divalent polyoxyalkylene radical, wherein the m+n polyoxyalkylene radicals bound to Z can be different from one another, and wherein one radical A is in each case bound to Z via an oxygen atom belonging to Z, and one oxygen atom belonging to A is bound to B or hydrogen, B is a chemical bond or a divalent organic radical having 1 to 50 carbon atoms, OR1 is a hydrolysable group, R1 and R2 independently of one another are a linear or branched alkyl group having 1 to 6 carbon atoms and r is an integer from 1 to 3, and m is an integer ≧1 and n is 0 or an integer ≧1, and m+n has a value from 3 to 100, b) at least one surfactant, c) water and/or at least one nonaqueous solvent, d) if appropriate further conventional components of surface treatment and/or cleaning compositions which are compatible with the remaining components of the composition.