How to tell a student that s/he should enroll in a different program? Through the years I had several students that clearly were not fitted for computer science. Some of them ended up by dropping the program after a few years, some of them are still there struggling year after year.

I guess that one of the main problems is that they shouldn’t even have started the program, but due to unemployment of other programs, and the permanent media coverage on the lack of IT professionals, they end up enrolling.

Right now I am aware of 5-10 students that are on their 7th, 8th and further years on a 3 year program. And some of them are getting worse every year. So, they are basically spending their parents’ money and could be doing something more productive instead of just being there.

In some cases, it just makes me sad to see that they are absolutely unable to progress. 

So, my question is: has any of you ever had to tell a student that s/he should probably enroll in a different program?  

Note: I am aware of this question about CS class, my question is about the entire program.
Don't tell them anything. Ask pointed questions.  Ask why they chose this course, or this major.  Ask where they expect to be in a year or in five years.  Make them talk through their plans.  Let them find the gaps in it.

This past semester, I asked every single student that came in to my office to change majors to CS (or to IT) the same first question: "Why?"  Some students had a great immediate answer, and I signed the form right away.  With others, we had a 20 minute conversation.  Some of them said they're in it for the money, and I would say things like "You'll make more money as a plumber, and you don't need college for that."  "Oh, but my dad said-"  "But what do you want?"

It's like helping them learn to debug.  Let them come to the decision.