We use the saddle-point method (due to Hildebrand--Tenenbaum [3]) to study the asymptotic behaviour of $\sum_{n\le x, P(n)\le y}\tau_k(n)$ for any $k>0$ fixed, where $P(n)$ is the greatest prime factor of $n$ and $\tau_k$ is Piltz' function. We generalize all results in [3], where the case $k=1$ has been treated.